<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="chat_v1.html">Google Chat API</a> . <a href="chat_v1.dms.html">dms</a> . <a href="chat_v1.dms.conversations.html">conversations</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#messages">messages(parent, body=None, messageId=None, messageReplyOption=None, requestId=None, threadKey=None, x__xgafv=None)</a></code></p>
<p class="firstline">Legacy path for creating message. Calling these will result in a BadRequest response.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="messages">messages(parent, body=None, messageId=None, messageReplyOption=None, requestId=None, threadKey=None, x__xgafv=None)</code>
  <pre>Legacy path for creating message. Calling these will result in a BadRequest response.

Args:
  parent: string, Required. The resource name of the space in which to create a message. Format: spaces/{space} (required)
  body: object, The request body.
    The object takes the form of:

{ # A message in Google Chat.
  &quot;actionResponse&quot;: { # Parameters that a Chat app can use to configure how it&#x27;s response is posted. # Input only. Parameters that a Chat app can use to configure how its response is posted.
    &quot;dialogAction&quot;: { # Contains a [dialog](https://developers.google.com/chat/how-tos/dialogs) and request status code. # Input only. A response to an event related to a [dialog](https://developers.google.com/chat/how-tos/dialogs). Must be accompanied by `ResponseType.Dialog`.
      &quot;actionStatus&quot;: { # Represents the status for a request to either invoke or submit a [dialog](https://developers.google.com/chat/how-tos/dialogs). # Input only. Status for a request to either invoke or submit a [dialog](https://developers.google.com/chat/how-tos/dialogs). Displays a status and message to users, if necessary. For example, in case of an error or success.
        &quot;statusCode&quot;: &quot;A String&quot;, # The status code.
        &quot;userFacingMessage&quot;: &quot;A String&quot;, # The message to send users about the status of their request. If unset, a generic message based on the `status_code` is sent.
      },
      &quot;dialog&quot;: { # Wrapper around the card body of the dialog. # Input only. [Dialog](https://developers.google.com/chat/how-tos/dialogs) for the request.
        &quot;body&quot;: { # Cards support a defined layout, interactive UI elements like buttons, and rich media like images. Use cards to present detailed information, gather information from users, and guide users to take a next step. In Google Chat, cards appear in several places: - As stand-alone messages. - Accompanying a text message, just beneath the text message. - As a [dialog](https://developers.google.com/chat/how-tos/dialogs). The following example JSON creates a &quot;contact card&quot; that features: - A header with the contact&#x27;s name, job title, avatar picture. - A section with the contact information, including formatted text. - Buttons that users can click to share the contact or see more or less info. ![Example contact card](https://developers.google.com/chat/images/card_api_reference.png) ``` { &quot;cardsV2&quot;: [ { &quot;cardId&quot;: &quot;unique-card-id&quot;, &quot;card&quot;: { &quot;header&quot;: { &quot;title&quot;: &quot;Sasha&quot;, &quot;subtitle&quot;: &quot;Software Engineer&quot;, &quot;imageUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot;, &quot;imageType&quot;: &quot;CIRCLE&quot;, &quot;imageAltText&quot;: &quot;Avatar for Sasha&quot;, }, &quot;sections&quot;: [ { &quot;header&quot;: &quot;Contact Info&quot;, &quot;collapsible&quot;: true, &quot;uncollapsibleWidgetsCount&quot;: 1, &quot;widgets&quot;: [ { &quot;decoratedText&quot;: { &quot;startIcon&quot;: { &quot;knownIcon&quot;: &quot;EMAIL&quot;, }, &quot;text&quot;: &quot;sasha@example.com&quot;, } }, { &quot;decoratedText&quot;: { &quot;startIcon&quot;: { &quot;knownIcon&quot;: &quot;PERSON&quot;, }, &quot;text&quot;: &quot;Online&quot;, }, }, { &quot;decoratedText&quot;: { &quot;startIcon&quot;: { &quot;knownIcon&quot;: &quot;PHONE&quot;, }, &quot;text&quot;: &quot;+1 (555) 555-1234&quot;, } }, { &quot;buttonList&quot;: { &quot;buttons&quot;: [ { &quot;text&quot;: &quot;Share&quot;, &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;: &quot;https://example.com/share&quot;, } } }, { &quot;text&quot;: &quot;Edit&quot;, &quot;onClick&quot;: { &quot;action&quot;: { &quot;function&quot;: &quot;goToView&quot;, &quot;parameters&quot;: [ { &quot;key&quot;: &quot;viewType&quot;, &quot;value&quot;: &quot;EDIT&quot;, } ], } } }, ], } }, ], }, ], }, } ], } ``` # Input only. Body of the dialog, which is rendered in a modal. Google Chat apps do not support the following card entities: `DateTimePicker`, `OnChangeAction`.
          &quot;cardActions&quot;: [ # The card&#x27;s actions. Actions are added to the card&#x27;s toolbar menu. Because Chat app cards have no toolbar, `cardActions[]` is not supported by Chat apps. For example, the following JSON constructs a card action menu with Settings and Send Feedback options: ``` &quot;card_actions&quot;: [ { &quot;actionLabel&quot;: &quot;Settings&quot;, &quot;onClick&quot;: { &quot;action&quot;: { &quot;functionName&quot;: &quot;goToView&quot;, &quot;parameters&quot;: [ { &quot;key&quot;: &quot;viewType&quot;, &quot;value&quot;: &quot;SETTING&quot; } ], &quot;loadIndicator&quot;: &quot;LoadIndicator.SPINNER&quot; } } }, { &quot;actionLabel&quot;: &quot;Send Feedback&quot;, &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;: &quot;https://example.com/feedback&quot; } } } ] ```
            { # A card action is the action associated with the card. For example, an invoice card might include actions such as delete invoice, email invoice, or open the invoice in a browser. Not supported by Chat apps.
              &quot;actionLabel&quot;: &quot;A String&quot;, # The label that displays as the action menu item.
              &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The `onClick` action for this action item.
                &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                  &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                  &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                  &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                  &quot;parameters&quot;: [ # List of action parameters.
                    { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                      &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                      &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                    },
                  ],
                  &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                },
                &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                  &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                  &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                  &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                  &quot;parameters&quot;: [ # List of action parameters.
                    { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                      &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                      &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                    },
                  ],
                  &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                },
                &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                  &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                  &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                  &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                },
              },
            },
          ],
          &quot;displayStyle&quot;: &quot;A String&quot;, # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. Not supported by Chat apps.
          &quot;fixedFooter&quot;: { # A persistent (sticky) footer that that appears at the bottom of the card. Setting `fixedFooter` without specifying a `primaryButton` or a `secondaryButton` causes an error. Chat apps support `fixedFooter` in [dialogs](https://developers.google.com/chat/how-tos/dialogs), but not in [card messages](https://developers.google.com/chat/api/guides/message-formats/cards). # The fixed footer shown at the bottom of this card. Setting `fixedFooter` without specifying a `primaryButton` or a `secondaryButton` causes an error. Chat apps support `fixedFooter` in [dialogs](https://developers.google.com/chat/how-tos/dialogs), but not in [card messages](https://developers.google.com/chat/api/guides/message-formats/cards).
            &quot;primaryButton&quot;: { # A text, icon, or text + icon button that users can click. To make an image a clickable button, specify an Image (not an ImageComponent) and set an `onClick` action. # The primary button of the fixed footer. The button must be a text button with text and color set.
              &quot;altText&quot;: &quot;A String&quot;, # The alternative text used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;. Has no effect when an icon is set; use `icon.alt_text` instead.
              &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background will likely result in white text. If unset, the image background is white and the font color is blue. For red, green and blue, the value of each field is a `float` number that can be expressed in either of two ways: as a number between 0 and 255 divided by 255 (153/255) or as a value between 0 and 1 (0.6). 0 represents the absence of a color and 1 or 255/255 represent the full presence of that color on the RGB scale. Optionally set alpha, which sets a level of transparency using this equation: ``` pixel color = alpha * (this color) + (1.0 - alpha) * (background color) ``` For alpha, a value of 1 corresponds with a solid color, and a value of 0 corresponds with a completely transparent color. For example, the following color represents a half transparent red: ``` &quot;color&quot;: { &quot;red&quot;: 1, &quot;green&quot;: 0, &quot;blue&quot;: 0, &quot;alpha&quot;: 0.5 } ```
                &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
              },
              &quot;disabled&quot;: True or False, # If `true`, the button is displayed in an inactive state and doesn&#x27;t respond to user actions.
              &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon image. If both `icon` and `text` are set, then the icon appears in place of the text. Support for both an icon and text is coming soon.
                &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
              },
              &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The action to perform when the button is clicked, such as opening a hyperlink or running a custom function.
                &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                  &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                  &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                  &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                  &quot;parameters&quot;: [ # List of action parameters.
                    { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                      &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                      &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                    },
                  ],
                  &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                },
                &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                  &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                  &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                  &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                  &quot;parameters&quot;: [ # List of action parameters.
                    { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                      &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                      &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                    },
                  ],
                  &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                },
                &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                  &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                  &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                  &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                },
              },
              &quot;text&quot;: &quot;A String&quot;, # The text displayed inside the button.
            },
            &quot;secondaryButton&quot;: { # A text, icon, or text + icon button that users can click. To make an image a clickable button, specify an Image (not an ImageComponent) and set an `onClick` action. # The secondary button of the fixed footer. The button must be a text button with text and color set. `primaryButton` must be set if `secondaryButton` is set.
              &quot;altText&quot;: &quot;A String&quot;, # The alternative text used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;. Has no effect when an icon is set; use `icon.alt_text` instead.
              &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background will likely result in white text. If unset, the image background is white and the font color is blue. For red, green and blue, the value of each field is a `float` number that can be expressed in either of two ways: as a number between 0 and 255 divided by 255 (153/255) or as a value between 0 and 1 (0.6). 0 represents the absence of a color and 1 or 255/255 represent the full presence of that color on the RGB scale. Optionally set alpha, which sets a level of transparency using this equation: ``` pixel color = alpha * (this color) + (1.0 - alpha) * (background color) ``` For alpha, a value of 1 corresponds with a solid color, and a value of 0 corresponds with a completely transparent color. For example, the following color represents a half transparent red: ``` &quot;color&quot;: { &quot;red&quot;: 1, &quot;green&quot;: 0, &quot;blue&quot;: 0, &quot;alpha&quot;: 0.5 } ```
                &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
              },
              &quot;disabled&quot;: True or False, # If `true`, the button is displayed in an inactive state and doesn&#x27;t respond to user actions.
              &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon image. If both `icon` and `text` are set, then the icon appears in place of the text. Support for both an icon and text is coming soon.
                &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
              },
              &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The action to perform when the button is clicked, such as opening a hyperlink or running a custom function.
                &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                  &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                  &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                  &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                  &quot;parameters&quot;: [ # List of action parameters.
                    { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                      &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                      &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                    },
                  ],
                  &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                },
                &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                  &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                  &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                  &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                  &quot;parameters&quot;: [ # List of action parameters.
                    { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                      &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                      &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                    },
                  ],
                  &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                },
                &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                  &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                  &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                  &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                },
              },
              &quot;text&quot;: &quot;A String&quot;, # The text displayed inside the button.
            },
          },
          &quot;header&quot;: { # Represents a card header. # The header of the card. A header usually contains a leading image and a title. Headers always appear at the top of a card.
            &quot;imageAltText&quot;: &quot;A String&quot;, # The alternative text of this image which is used for accessibility.
            &quot;imageType&quot;: &quot;A String&quot;, # The shape used to crop the image.
            &quot;imageUrl&quot;: &quot;A String&quot;, # The HTTPS URL of the image in the card header.
            &quot;subtitle&quot;: &quot;A String&quot;, # The subtitle of the card header. If specified, appears on its own line below the `title`.
            &quot;title&quot;: &quot;A String&quot;, # Required. The title of the card header. The header has a fixed height: if both a title and subtitle are specified, each takes up one line. If only the title is specified, it takes up both lines.
          },
          &quot;name&quot;: &quot;A String&quot;, # Name of the card. Used as a card identifier in card navigation. Because Chat apps don&#x27;t support card navigation, they ignore this field.
          &quot;peekCardHeader&quot;: { # Represents a card header. # When displaying contextual content, the peek card header acts as a placeholder so that the user can navigate forward between the homepage cards and the contextual cards. Not supported by Chat apps.
            &quot;imageAltText&quot;: &quot;A String&quot;, # The alternative text of this image which is used for accessibility.
            &quot;imageType&quot;: &quot;A String&quot;, # The shape used to crop the image.
            &quot;imageUrl&quot;: &quot;A String&quot;, # The HTTPS URL of the image in the card header.
            &quot;subtitle&quot;: &quot;A String&quot;, # The subtitle of the card header. If specified, appears on its own line below the `title`.
            &quot;title&quot;: &quot;A String&quot;, # Required. The title of the card header. The header has a fixed height: if both a title and subtitle are specified, each takes up one line. If only the title is specified, it takes up both lines.
          },
          &quot;sections&quot;: [ # Contains a collection of widgets. Each section has its own, optional header. Sections are visually separated by a line divider.
            { # A section contains a collection of widgets that are rendered vertically in the order that they are specified.
              &quot;collapsible&quot;: True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
              &quot;header&quot;: &quot;A String&quot;, # Text that appears at the top of a section. Supports [simple HTML formatted text](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
              &quot;uncollapsibleWidgetsCount&quot;: 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
              &quot;widgets&quot;: [ # All the widgets in the section. Must contain at least 1 widget.
                { # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
                  &quot;buttonList&quot;: { # A list of buttons layed out horizontally. # A list of buttons. For example, the following JSON creates two buttons. The first is a blue text button and the second is an image button that opens a link: ``` &quot;buttonList&quot;: { &quot;buttons&quot;: [ &quot;button&quot;: { &quot;text&quot;: &quot;Edit&quot;, &quot;color&quot;: { &quot;red&quot;: 0, &quot;green&quot;: 0, &quot;blue&quot;: 1, &quot;alpha&quot;: 1 } &quot;disabled&quot;: true }, &quot;button&quot;: { &quot;icon&quot;: { &quot;knownIcon&quot;: &quot;INVITE&quot; &quot;altText&quot;: &quot;check calendar&quot; }, &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;: &quot;https://example.com/calendar&quot; } } }, ] } ```
                    &quot;buttons&quot;: [ # An array of buttons.
                      { # A text, icon, or text + icon button that users can click. To make an image a clickable button, specify an Image (not an ImageComponent) and set an `onClick` action.
                        &quot;altText&quot;: &quot;A String&quot;, # The alternative text used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;. Has no effect when an icon is set; use `icon.alt_text` instead.
                        &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background will likely result in white text. If unset, the image background is white and the font color is blue. For red, green and blue, the value of each field is a `float` number that can be expressed in either of two ways: as a number between 0 and 255 divided by 255 (153/255) or as a value between 0 and 1 (0.6). 0 represents the absence of a color and 1 or 255/255 represent the full presence of that color on the RGB scale. Optionally set alpha, which sets a level of transparency using this equation: ``` pixel color = alpha * (this color) + (1.0 - alpha) * (background color) ``` For alpha, a value of 1 corresponds with a solid color, and a value of 0 corresponds with a completely transparent color. For example, the following color represents a half transparent red: ``` &quot;color&quot;: { &quot;red&quot;: 1, &quot;green&quot;: 0, &quot;blue&quot;: 0, &quot;alpha&quot;: 0.5 } ```
                          &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                          &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                          &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                          &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                        },
                        &quot;disabled&quot;: True or False, # If `true`, the button is displayed in an inactive state and doesn&#x27;t respond to user actions.
                        &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon image. If both `icon` and `text` are set, then the icon appears in place of the text. Support for both an icon and text is coming soon.
                          &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                          &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                          &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                          &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                        },
                        &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The action to perform when the button is clicked, such as opening a hyperlink or running a custom function.
                          &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                            &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                            &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                            &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                            &quot;parameters&quot;: [ # List of action parameters.
                              { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                                &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                                &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                              },
                            ],
                            &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                          },
                          &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                          &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                            &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                            &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                            &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                            &quot;parameters&quot;: [ # List of action parameters.
                              { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                                &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                                &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                              },
                            ],
                            &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                          },
                          &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                            &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                            &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                            &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                          },
                        },
                        &quot;text&quot;: &quot;A String&quot;, # The text displayed inside the button.
                      },
                    ],
                  },
                  &quot;dateTimePicker&quot;: { # Lets users specify a date, a time, or both a date and a time. Accepts text input from users, but features an interactive date and time selector that helps users enter correctly-formatted dates and times. If users enter a date or time incorrectly, the widget shows an error that prompts users to enter the correct format. Not supported by Chat apps. Support by Chat apps coming soon. # Displays a selection/input widget for date, time, or date and time. Not supported by Chat apps. Support by Chat apps is coming soon. For example, the following JSON creates a datetime picker to schedule an appointment: ``` &quot;date_time_picker&quot;: { &quot;name&quot;: &quot;appointment_time&quot;, &quot;label&quot;: &quot;Book your appointment at:&quot;, &quot;type&quot;: &quot;DateTimePickerType.DATE_AND_TIME&quot;, &quot;valueMsEpoch&quot;: &quot;796435200000&quot; } ```
                    &quot;label&quot;: &quot;A String&quot;, # The text that prompts users to enter a date, time, or datetime. Specify text that helps the user enter the information your app needs. For example, if users are setting an appointment, then a label like &quot;Appointment date&quot; or &quot;Appointment date and time&quot; might work well.
                    &quot;name&quot;: &quot;A String&quot;, # The name by which the datetime picker is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                    &quot;onChangeAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # Triggered when the user clicks **Save** or **Clear** from the datetime picker interface.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;timezoneOffsetDate&quot;: 42, # The number representing the time zone offset from UTC, in minutes. If set, the `value_ms_epoch` is displayed in the specified time zone. If not set, it uses the user&#x27;s time zone setting on the client side.
                    &quot;type&quot;: &quot;A String&quot;, # What kind of date and time input the datetime picker supports.
                    &quot;valueMsEpoch&quot;: &quot;A String&quot;, # The value displayed as the default value before user input or previous user input, represented in milliseconds ([Epoch time](https://en.wikipedia.org/wiki/Unix_time)). For `DATE_AND_TIME` type, the full epoch value is used. For `DATE_ONLY` type, only date of the epoch time is used. For `TIME_ONLY` type, only time of the epoch time is used. For example, to represent 3:00 AM, set epoch time to `3 * 60 * 60 * 1000`.
                  },
                  &quot;decoratedText&quot;: { # A widget that displays text with optional decorations such as a label above or below the text, an icon in front of the text, a selection widget or a button after the text. # Displays a decorated text item. For example, the following JSON creates a decorated text widget showing email address: ``` &quot;decoratedText&quot;: { &quot;icon&quot;: { &quot;knownIcon&quot;: &quot;EMAIL&quot; }, &quot;topLabel&quot;: &quot;Email Address&quot;, &quot;text&quot;: &quot;sasha@example.com&quot;, &quot;bottomLabel&quot;: &quot;This is a new Email address!&quot;, &quot;switchWidget&quot;: { &quot;name&quot;: &quot;has_send_welcome_email_to_sasha&quot;, &quot;selected&quot;: false, &quot;controlType&quot;: &quot;ControlType.CHECKBOX&quot; } } ```
                    &quot;bottomLabel&quot;: &quot;A String&quot;, # The text that appears below `text`. Always truncates. Supports simple formatting. See Text formatting for formatting details.
                    &quot;button&quot;: { # A text, icon, or text + icon button that users can click. To make an image a clickable button, specify an Image (not an ImageComponent) and set an `onClick` action. # A button that can be clicked to trigger an action.
                      &quot;altText&quot;: &quot;A String&quot;, # The alternative text used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;. Has no effect when an icon is set; use `icon.alt_text` instead.
                      &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background will likely result in white text. If unset, the image background is white and the font color is blue. For red, green and blue, the value of each field is a `float` number that can be expressed in either of two ways: as a number between 0 and 255 divided by 255 (153/255) or as a value between 0 and 1 (0.6). 0 represents the absence of a color and 1 or 255/255 represent the full presence of that color on the RGB scale. Optionally set alpha, which sets a level of transparency using this equation: ``` pixel color = alpha * (this color) + (1.0 - alpha) * (background color) ``` For alpha, a value of 1 corresponds with a solid color, and a value of 0 corresponds with a completely transparent color. For example, the following color represents a half transparent red: ``` &quot;color&quot;: { &quot;red&quot;: 1, &quot;green&quot;: 0, &quot;blue&quot;: 0, &quot;alpha&quot;: 0.5 } ```
                        &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                        &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                        &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                        &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                      },
                      &quot;disabled&quot;: True or False, # If `true`, the button is displayed in an inactive state and doesn&#x27;t respond to user actions.
                      &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon image. If both `icon` and `text` are set, then the icon appears in place of the text. Support for both an icon and text is coming soon.
                        &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                        &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                        &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                        &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                      },
                      &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The action to perform when the button is clicked, such as opening a hyperlink or running a custom function.
                        &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                          &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                          &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                          &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                          &quot;parameters&quot;: [ # List of action parameters.
                            { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                              &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                              &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                            },
                          ],
                          &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                        },
                        &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                        &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                          &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                          &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                          &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                          &quot;parameters&quot;: [ # List of action parameters.
                            { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                              &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                              &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                            },
                          ],
                          &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                        },
                        &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                          &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                          &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                          &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                        },
                      },
                      &quot;text&quot;: &quot;A String&quot;, # The text displayed inside the button.
                    },
                    &quot;endIcon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # An icon displayed after the text. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards#builtinicons) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons.
                      &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                      &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                      &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                      &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                    },
                    &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # Deprecated in favor of `startIcon`.
                      &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                      &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                      &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                      &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                    },
                    &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # When users click on `topLabel` or `bottomLabel`, this action triggers.
                      &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                        &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                        &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                        &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                        &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                      },
                      &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                      &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                        &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                        &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                        &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                        &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                      },
                      &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                        &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                        &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                        &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                      },
                    },
                    &quot;startIcon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon displayed in front of the text.
                      &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                      &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                      &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                      &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                    },
                    &quot;switchControl&quot;: { # Either a toggle-style switch or a checkbox inside a `decoratedText` widget. Only supported on the `decoratedText` widget. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. # A switch widget can be clicked to change its state and trigger an action. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon.
                      &quot;controlType&quot;: &quot;A String&quot;, # How the switch appears in the user interface.
                      &quot;name&quot;: &quot;A String&quot;, # The name by which the switch widget is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                      &quot;onChangeAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # The action to perform when the switch state is changed, such as what function to run.
                        &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                        &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                        &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                        &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                      },
                      &quot;selected&quot;: True or False, # When `true`, the switch is selected.
                      &quot;value&quot;: &quot;A String&quot;, # The value entered by a user, returned as part of a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                    },
                    &quot;text&quot;: &quot;A String&quot;, # Required. The primary text. Supports simple formatting. See Text formatting for formatting details.
                    &quot;topLabel&quot;: &quot;A String&quot;, # The text that appears above `text`. Always truncates. Supports simple formatting. See Text formatting for formatting details.
                    &quot;wrapText&quot;: True or False, # The wrap text setting. If `true`, the text wraps and displays on multiple lines. Otherwise, the text is truncated. Only applies to `text`, not `topLabel` and `bottomLabel`.
                  },
                  &quot;divider&quot;: { # Displays a divider between widgets, a horizontal line. For example, the following JSON creates a divider: ``` &quot;divider&quot;: { } ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` &quot;divider&quot;: { } ```
                  },
                  &quot;grid&quot;: { # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by items divided by columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. For example, the following JSON creates a 2 column grid with a single item: ``` &quot;grid&quot;: { &quot;title&quot;: &quot;A fine collection of items&quot;, &quot;numColumns&quot;: 2, &quot;borderStyle&quot;: { &quot;type&quot;: &quot;STROKE&quot;, &quot;cornerRadius&quot;: 4.0 }, &quot;items&quot;: [ &quot;image&quot;: { &quot;imageUri&quot;: &quot;https://www.example.com/image.png&quot;, &quot;cropStyle&quot;: { &quot;type&quot;: &quot;SQUARE&quot; }, &quot;borderStyle&quot;: { &quot;type&quot;: &quot;STROKE&quot; } }, &quot;title&quot;: &quot;An item&quot;, &quot;textAlignment&quot;: &quot;CENTER&quot; ], &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;:&quot;https://www.example.com&quot; } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. For example, the following JSON creates a 2 column grid with a single item: ``` &quot;grid&quot;: { &quot;title&quot;: &quot;A fine collection of items&quot;, &quot;numColumns&quot;: 2, &quot;borderStyle&quot;: { &quot;type&quot;: &quot;STROKE&quot;, &quot;cornerRadius&quot;: 4.0 }, &quot;items&quot;: [ &quot;image&quot;: { &quot;imageUri&quot;: &quot;https://www.example.com/image.png&quot;, &quot;cropStyle&quot;: { &quot;type&quot;: &quot;SQUARE&quot; }, &quot;borderStyle&quot;: { &quot;type&quot;: &quot;STROKE&quot; } }, &quot;title&quot;: &quot;An item&quot;, &quot;textAlignment&quot;: &quot;CENTER&quot; ], &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;:&quot;https://www.example.com&quot; } } } ```
                    &quot;borderStyle&quot;: { # Represents the complete border style applied to items in a widget. # The border style to apply to each grid item.
                      &quot;cornerRadius&quot;: 42, # The corner radius for the border.
                      &quot;strokeColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The colors to use when the type is `BORDER_TYPE_STROKE`.
                        &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                        &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                        &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                        &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                      },
                      &quot;type&quot;: &quot;A String&quot;, # The border type.
                    },
                    &quot;columnCount&quot;: 42, # The number of columns to display in the grid. A default value is used if this field isn&#x27;t specified, and that default value is different depending on where the grid is shown (dialog versus companion).
                    &quot;items&quot;: [ # The items to display in the grid.
                      { # Represents a single item in the grid layout.
                        &quot;id&quot;: &quot;A String&quot;, # A user-specified identifier for this grid item. This identifier is returned in the parent Grid&#x27;s onClick callback parameters.
                        &quot;image&quot;: { # Represents an image. # The image that displays in the grid item.
                          &quot;altText&quot;: &quot;A String&quot;, # The accessibility label for the image.
                          &quot;borderStyle&quot;: { # Represents the complete border style applied to items in a widget. # The border style to apply to the image.
                            &quot;cornerRadius&quot;: 42, # The corner radius for the border.
                            &quot;strokeColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The colors to use when the type is `BORDER_TYPE_STROKE`.
                              &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                              &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                              &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                              &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                            },
                            &quot;type&quot;: &quot;A String&quot;, # The border type.
                          },
                          &quot;cropStyle&quot;: { # Represents the crop style applied to an image. For example, here&#x27;s how to apply a 16 by 9 aspect ratio: ``` cropStyle { &quot;type&quot;: &quot;RECTANGLE_CUSTOM&quot;, &quot;aspectRatio&quot;: 16/9 } ``` # The crop style to apply to the image.
                            &quot;aspectRatio&quot;: 3.14, # The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. For example, here&#x27;s how to apply a 16 by 9 aspect ratio: ``` cropStyle { &quot;type&quot;: &quot;RECTANGLE_CUSTOM&quot;, &quot;aspectRatio&quot;: 16/9 } ```
                            &quot;type&quot;: &quot;A String&quot;, # The crop type.
                          },
                          &quot;imageUri&quot;: &quot;A String&quot;, # The image URL.
                        },
                        &quot;layout&quot;: &quot;A String&quot;, # The layout to use for the grid item.
                        &quot;subtitle&quot;: &quot;A String&quot;, # The grid item&#x27;s subtitle.
                        &quot;title&quot;: &quot;A String&quot;, # The grid item&#x27;s title.
                      },
                    ],
                    &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # This callback is reused by each individual grid item, but with the item&#x27;s identifier and index in the items list added to the callback&#x27;s parameters.
                      &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                        &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                        &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                        &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                        &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                      },
                      &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                      &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                        &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                        &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                        &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                        &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                      },
                      &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                        &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                        &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                        &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                      },
                    },
                    &quot;title&quot;: &quot;A String&quot;, # The text that displays in the grid header.
                  },
                  &quot;image&quot;: { # An image that is specified by a URL and can have an `onClick` action. # Displays an image. For example, the following JSON creates an image with alternative text: ``` &quot;image&quot;: { &quot;imageUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; &quot;altText&quot;: &quot;Chat app avatar&quot; } ```
                    &quot;altText&quot;: &quot;A String&quot;, # The alternative text of this image, used for accessibility.
                    &quot;imageUrl&quot;: &quot;A String&quot;, # The `https` URL that hosts the image. For example: ``` https://developers.google.com/chat/images/quickstart-app-avatar.png ```
                    &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # When a user clicks on the image, the click triggers this action.
                      &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                        &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                        &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                        &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                        &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                      },
                      &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                      &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                        &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                        &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                        &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                        &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                      },
                      &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                        &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                        &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                        &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                      },
                    },
                  },
                  &quot;selectionInput&quot;: { # A widget that creates a UI item with options for users to select. For example, a dropdown menu or check list. Chat apps receive and can process the value of entered text during form input events. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs). When you need to collect data from users that matches options you set, use a selection input. To collect abstract data from users, use the text input widget instead. Only supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) coming soon. # Displays a selection control that lets users select items. Selection controls can be check boxes, radio buttons, switches, or dropdown menus. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` &quot;selectionInput&quot;: { &quot;name&quot;: &quot;size&quot;, &quot;label&quot;: &quot;Size&quot; &quot;type&quot;: &quot;SelectionType.DROPDOWN&quot;, &quot;items&quot;: [ { &quot;text&quot;: &quot;S&quot;, &quot;value&quot;: &quot;small&quot;, &quot;selected&quot;: false }, { &quot;text&quot;: &quot;M&quot;, &quot;value&quot;: &quot;medium&quot;, &quot;selected&quot;: true }, { &quot;text&quot;: &quot;L&quot;, &quot;value&quot;: &quot;large&quot;, &quot;selected&quot;: false }, { &quot;text&quot;: &quot;XL&quot;, &quot;value&quot;: &quot;extra_large&quot;, &quot;selected&quot;: false } ] } ```
                    &quot;items&quot;: [ # An array of the selected items. For example, all the selected check boxes.
                      { # A selectable item in a selection input, such as a check box or a switch.
                        &quot;selected&quot;: True or False, # When `true`, more than one item is selected. If more than one item is selected for radio buttons and dropdown menus, the first selected item is received and the ones after are ignored.
                        &quot;text&quot;: &quot;A String&quot;, # The text displayed to users.
                        &quot;value&quot;: &quot;A String&quot;, # The value associated with this item. The client should use this as a form input value. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                      },
                    ],
                    &quot;label&quot;: &quot;A String&quot;, # The text that appears above the selection input field in the user interface. Specify text that helps the user enter the information your app needs. For example, if users are selecting the urgency of a work ticket from a drop-down menu, the label might be &quot;Urgency&quot; or &quot;Select urgency&quot;.
                    &quot;name&quot;: &quot;A String&quot;, # The name by which the selection input is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                    &quot;onChangeAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, the form is submitted when the selection changes. If not specified, you must specify a separate button that submits the form. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;type&quot;: &quot;A String&quot;, # The way that an option appears to users. Different options support different types of interactions. For example, users can enable multiple check boxes, but can only select one value from a dropdown menu. Each selection input supports one type of selection. Mixing check boxes and switches, for example, is not supported.
                  },
                  &quot;textInput&quot;: { # A field in which users can enter text. Supports suggestions and on-change actions. Chat apps receive and can process the value of entered text during form input events. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs). When you need to collect abstract data from users, use a text input. To collect defined data from users, use the selection input widget instead. Only supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) coming soon. # Displays a text box that users can type into. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. For example, the following JSON creates a text input for an email address: ``` &quot;textInput&quot;: { &quot;name&quot;: &quot;mailing_address&quot;, &quot;label&quot;: &quot;Mailing Address&quot; } ``` As another example, the following JSON creates a text input for a programming language with static suggestions: ``` &quot;textInput&quot;: { &quot;name&quot;: &quot;preferred_programing_language&quot;, &quot;label&quot;: &quot;Preferred Language&quot;, &quot;initialSuggestions&quot;: { &quot;items&quot;: [ { &quot;text&quot;: &quot;C++&quot; }, { &quot;text&quot;: &quot;Java&quot; }, { &quot;text&quot;: &quot;JavaScript&quot; }, { &quot;text&quot;: &quot;Python&quot; } ] } } ```
                    &quot;autoCompleteAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # Optional. Specify what action to take when the text input field provides suggestions to users who interact with it. If unspecified, the suggestions are set by `initialSuggestions` and are processed by the client. If specified, the app takes the action specified here, such as running a custom function. Supported by Google Workspace Add-ons, but not Chat apps. Support by Chat apps coming soon.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;hintText&quot;: &quot;A String&quot;, # Text that appears inside the text input field meant to assist users by prompting them to enter a certain value. This text is not visible after users begin typing. Required if `label` is unspecified. Otherwise, optional.
                    &quot;initialSuggestions&quot;: { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing &quot;Jav&quot;, the list of suggestions filters to show just Java and JavaScript. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter &quot;javascript&quot; and others &quot;java script&quot;. Suggesting &quot;JavaScript&quot; can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it is set to `MULTIPLE_LINE`. # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing &quot;Jav&quot;, the list of suggestions filters to show just Java and JavaScript. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter &quot;javascript&quot; and others &quot;java script&quot;. Suggesting &quot;JavaScript&quot; can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it is set to `MULTIPLE_LINE`.
                      &quot;items&quot;: [ # A list of suggestions used for autocomplete recommendations in text input fields.
                        { # One suggested value that users can enter in a text input field.
                          &quot;text&quot;: &quot;A String&quot;, # The value of a suggested input to a text input field. This is equivalent to what users would enter themselves.
                        },
                      ],
                    },
                    &quot;label&quot;: &quot;A String&quot;, # The text that appears above the text input field in the user interface. Specify text that helps the user enter the information your app needs. For example, if you are asking someone&#x27;s name, but specifically need their surname, write &quot;surname&quot; instead of &quot;name&quot;. Required if `hintText` is unspecified. Otherwise, optional.
                    &quot;name&quot;: &quot;A String&quot;, # The name by which the text input is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                    &quot;onChangeAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # What to do when a change occurs in the text input field. Examples of changes include a user adding to the field, or deleting text. Examples of actions to take include running a custom function or opening a [dialog](https://developers.google.com/chat/how-tos/dialogs) in Google Chat.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;type&quot;: &quot;A String&quot;, # How a text input field appears in the user interface. For example, whether the field is single or multi-line.
                    &quot;value&quot;: &quot;A String&quot;, # The value entered by a user, returned as part of a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                  },
                  &quot;textParagraph&quot;: { # A paragraph of text that supports formatting. See [Text formatting](https://developers.google.com/workspace/add-ons/concepts/widgets#text_formatting) for details. # Displays a text paragraph. Supports [simple HTML formatted text](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). For example, the following JSON creates a bolded text: ``` &quot;textParagraph&quot;: { &quot;text&quot;: &quot; *bold text*&quot; } ```
                    &quot;text&quot;: &quot;A String&quot;, # The text that&#x27;s shown in the widget.
                  },
                },
              ],
            },
          ],
        },
      },
    },
    &quot;type&quot;: &quot;A String&quot;, # Input only. The type of Chat app response.
    &quot;url&quot;: &quot;A String&quot;, # Input only. URL for users to auth or config. (Only for REQUEST_CONFIG response types.)
  },
  &quot;annotations&quot;: [ # Output only. Annotations associated with the text in this message.
    { # Annotations associated with the plain-text body of the message. Example plain-text message body: ``` Hello @FooBot how are you!&quot; ``` The corresponding annotations metadata: ``` &quot;annotations&quot;:[{ &quot;type&quot;:&quot;USER_MENTION&quot;, &quot;startIndex&quot;:6, &quot;length&quot;:7, &quot;userMention&quot;: { &quot;user&quot;: { &quot;name&quot;:&quot;users/107946847022116401880&quot;, &quot;displayName&quot;:&quot;FooBot&quot;, &quot;avatarUrl&quot;:&quot;https://goo.gl/aeDtrS&quot;, &quot;type&quot;:&quot;BOT&quot; }, &quot;type&quot;:&quot;MENTION&quot; } }] ```
      &quot;length&quot;: 42, # Length of the substring in the plain-text message body this annotation corresponds to.
      &quot;slashCommand&quot;: { # Annotation metadata for slash commands (/). # The metadata for a slash command.
        &quot;bot&quot;: { # A user in Google Chat. # The Chat app whose command was invoked.
          &quot;displayName&quot;: &quot;A String&quot;, # Output only. The user&#x27;s display name.
          &quot;domainId&quot;: &quot;A String&quot;, # Unique identifier of the user&#x27;s Google Workspace domain.
          &quot;isAnonymous&quot;: True or False, # Output only. When `true`, the user is deleted or their profile is not visible.
          &quot;name&quot;: &quot;A String&quot;, # Resource name for a Google Chat user. For human users, represents a person in the People API or a user in the Admin SDK Directory API. Format: `users/{user}`
          &quot;type&quot;: &quot;A String&quot;, # User type.
        },
        &quot;commandId&quot;: &quot;A String&quot;, # The command id of the invoked slash command.
        &quot;commandName&quot;: &quot;A String&quot;, # The name of the invoked slash command.
        &quot;triggersDialog&quot;: True or False, # Indicating whether the slash command is for a dialog.
        &quot;type&quot;: &quot;A String&quot;, # The type of slash command.
      },
      &quot;startIndex&quot;: 42, # Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to.
      &quot;type&quot;: &quot;A String&quot;, # The type of this annotation.
      &quot;userMention&quot;: { # Annotation metadata for user mentions (@). # The metadata of user mention.
        &quot;type&quot;: &quot;A String&quot;, # The type of user mention.
        &quot;user&quot;: { # A user in Google Chat. # The user mentioned.
          &quot;displayName&quot;: &quot;A String&quot;, # Output only. The user&#x27;s display name.
          &quot;domainId&quot;: &quot;A String&quot;, # Unique identifier of the user&#x27;s Google Workspace domain.
          &quot;isAnonymous&quot;: True or False, # Output only. When `true`, the user is deleted or their profile is not visible.
          &quot;name&quot;: &quot;A String&quot;, # Resource name for a Google Chat user. For human users, represents a person in the People API or a user in the Admin SDK Directory API. Format: `users/{user}`
          &quot;type&quot;: &quot;A String&quot;, # User type.
        },
      },
    },
  ],
  &quot;argumentText&quot;: &quot;A String&quot;, # Plain-text body of the message with all Chat app mentions stripped out.
  &quot;attachment&quot;: [ # User uploaded attachment.
    { # An attachment in Google Chat.
      &quot;attachmentDataRef&quot;: { # A reference to the attachment data. This is used with the media API to download the attachment data.
        &quot;resourceName&quot;: &quot;A String&quot;, # The resource name of the attachment data. This is used with the media API to download the attachment data.
      },
      &quot;contentName&quot;: &quot;A String&quot;, # The original file name for the content, not the full path.
      &quot;contentType&quot;: &quot;A String&quot;, # The content type (MIME type) of the file.
      &quot;downloadUri&quot;: &quot;A String&quot;, # Output only. The download URL which should be used to allow a human user to download the attachment. Chat apps should not use this URL to download attachment content.
      &quot;driveDataRef&quot;: { # A reference to the data of a drive attachment. # A reference to the drive attachment. This is used with the Drive API.
        &quot;driveFileId&quot;: &quot;A String&quot;, # The id for the drive file, for use with the Drive API.
      },
      &quot;name&quot;: &quot;A String&quot;, # Resource name of the attachment, in the form &quot;spaces/*/messages/*/attachments/*&quot;.
      &quot;source&quot;: &quot;A String&quot;, # The source of the attachment.
      &quot;thumbnailUri&quot;: &quot;A String&quot;, # Output only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps should not use this URL to download attachment content.
    },
  ],
  &quot;cards&quot;: [ # Deprecated: Use `cards_v2` instead. Rich, formatted and interactive cards that can be used to display UI elements such as: formatted texts, buttons, clickable images. Cards are normally displayed below the plain-text body of the message.
    { # A card is a UI element that can contain UI widgets such as texts, images.
      &quot;cardActions&quot;: [ # The actions of this card.
        { # A card action is the action associated with the card. For an invoice card, a typical action would be: delete invoice, email invoice or open the invoice in browser. Not supported by Google Chat apps.
          &quot;actionLabel&quot;: &quot;A String&quot;, # The label used to be displayed in the action menu item.
          &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action for this action item.
            &quot;action&quot;: { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified.
              &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired.
              &quot;parameters&quot;: [ # List of action parameters.
                { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters.
                  &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                  &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                },
              ],
            },
            &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
              &quot;url&quot;: &quot;A String&quot;, # The URL to open.
            },
          },
        },
      ],
      &quot;header&quot;: { # The header of the card. A header usually contains a title and an image.
        &quot;imageStyle&quot;: &quot;A String&quot;, # The image&#x27;s type (e.g. square border or circular border).
        &quot;imageUrl&quot;: &quot;A String&quot;, # The URL of the image in the card header.
        &quot;subtitle&quot;: &quot;A String&quot;, # The subtitle of the card header.
        &quot;title&quot;: &quot;A String&quot;, # The title must be specified. The header has a fixed height: if both a title and subtitle is specified, each will take up 1 line. If only the title is specified, it will take up both lines.
      },
      &quot;name&quot;: &quot;A String&quot;, # Name of the card.
      &quot;sections&quot;: [ # Sections are separated by a line divider.
        { # A section contains a collection of widgets that are rendered (vertically) in the order that they are specified. Across all platforms, cards have a narrow fixed width, so there is currently no need for layout properties (e.g. float).
          &quot;header&quot;: &quot;A String&quot;, # The header of the section, text formatted supported.
          &quot;widgets&quot;: [ # A section must contain at least 1 widget.
            { # A widget is a UI element that presents texts, images, etc.
              &quot;buttons&quot;: [ # A list of buttons. Buttons is also oneof data and only one of these fields should be set.
                { # A button. Can be a text button or an image button.
                  &quot;imageButton&quot;: { # An image button with an onclick action. # A button with image and onclick action.
                    &quot;icon&quot;: &quot;A String&quot;, # The icon specified by an enum that indices to an icon provided by Chat API.
                    &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
                    &quot;name&quot;: &quot;A String&quot;, # The name of this image_button which will be used for accessibility. Default value will be provided if developers don&#x27;t specify.
                    &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
                      &quot;action&quot;: { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified.
                        &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters.
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                      },
                      &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
                        &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                      },
                    },
                  },
                  &quot;textButton&quot;: { # A button with text and onclick action. # A button with text and onclick action.
                    &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action of the button.
                      &quot;action&quot;: { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified.
                        &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters.
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                      },
                      &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
                        &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                      },
                    },
                    &quot;text&quot;: &quot;A String&quot;, # The text of the button.
                  },
                },
              ],
              &quot;image&quot;: { # An image that is specified by a URL and can have an onclick action. # Display an image in this widget.
                &quot;aspectRatio&quot;: 3.14, # The aspect ratio of this image (width/height). This field allows clients to reserve the right height for the image while waiting for it to load. It&#x27;s not meant to override the native aspect ratio of the image. If unset, the server fills it by prefetching the image.
                &quot;imageUrl&quot;: &quot;A String&quot;, # The URL of the image.
                &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
                  &quot;action&quot;: { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified.
                    &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired.
                    &quot;parameters&quot;: [ # List of action parameters.
                      { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters.
                        &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                        &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                      },
                    ],
                  },
                  &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
                    &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                  },
                },
              },
              &quot;keyValue&quot;: { # A UI element contains a key (label) and a value (content). And this element may also contain some actions such as onclick button. # Display a key value item in this widget.
                &quot;bottomLabel&quot;: &quot;A String&quot;, # The text of the bottom label. Formatted text supported.
                &quot;button&quot;: { # A button. Can be a text button or an image button. # A button that can be clicked to trigger an action.
                  &quot;imageButton&quot;: { # An image button with an onclick action. # A button with image and onclick action.
                    &quot;icon&quot;: &quot;A String&quot;, # The icon specified by an enum that indices to an icon provided by Chat API.
                    &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
                    &quot;name&quot;: &quot;A String&quot;, # The name of this image_button which will be used for accessibility. Default value will be provided if developers don&#x27;t specify.
                    &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
                      &quot;action&quot;: { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified.
                        &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters.
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                      },
                      &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
                        &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                      },
                    },
                  },
                  &quot;textButton&quot;: { # A button with text and onclick action. # A button with text and onclick action.
                    &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action of the button.
                      &quot;action&quot;: { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified.
                        &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters.
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                      },
                      &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
                        &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                      },
                    },
                    &quot;text&quot;: &quot;A String&quot;, # The text of the button.
                  },
                },
                &quot;content&quot;: &quot;A String&quot;, # The text of the content. Formatted text supported and always required.
                &quot;contentMultiline&quot;: True or False, # If the content should be multiline.
                &quot;icon&quot;: &quot;A String&quot;, # An enum value that will be replaced by the Chat API with the corresponding icon image.
                &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
                &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action. Only the top label, bottom label and content region are clickable.
                  &quot;action&quot;: { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified.
                    &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired.
                    &quot;parameters&quot;: [ # List of action parameters.
                      { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters.
                        &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                        &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                      },
                    ],
                  },
                  &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
                    &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                  },
                },
                &quot;topLabel&quot;: &quot;A String&quot;, # The text of the top label. Formatted text supported.
              },
              &quot;textParagraph&quot;: { # A paragraph of text. Formatted text supported. # Display a text paragraph in this widget.
                &quot;text&quot;: &quot;A String&quot;,
              },
            },
          ],
        },
      ],
    },
  ],
  &quot;cardsV2&quot;: [ # Richly formatted and interactive cards that display UI elements and editable widgets, such as: - Formatted text - Buttons - Clickable images - Checkboxes - Radio buttons - Input widgets. Cards are usually displayed below the text-body of a Chat message, but can situationally appear other places, such as [dialogs](https://developers.google.com/chat/how-tos/dialogs). The `cardId` is a unique identifier among cards in the same message and for identifying user input values. Currently supported widgets include: - `TextParagraph` - `DecoratedText` - `Image` - `ButtonList` - `Divider`
    { # Widgets for Chat apps to specify.
      &quot;card&quot;: { # Cards support a defined layout, interactive UI elements like buttons, and rich media like images. Use cards to present detailed information, gather information from users, and guide users to take a next step. In Google Chat, cards appear in several places: - As stand-alone messages. - Accompanying a text message, just beneath the text message. - As a [dialog](https://developers.google.com/chat/how-tos/dialogs). The following example JSON creates a &quot;contact card&quot; that features: - A header with the contact&#x27;s name, job title, avatar picture. - A section with the contact information, including formatted text. - Buttons that users can click to share the contact or see more or less info. ![Example contact card](https://developers.google.com/chat/images/card_api_reference.png) ``` { &quot;cardsV2&quot;: [ { &quot;cardId&quot;: &quot;unique-card-id&quot;, &quot;card&quot;: { &quot;header&quot;: { &quot;title&quot;: &quot;Sasha&quot;, &quot;subtitle&quot;: &quot;Software Engineer&quot;, &quot;imageUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot;, &quot;imageType&quot;: &quot;CIRCLE&quot;, &quot;imageAltText&quot;: &quot;Avatar for Sasha&quot;, }, &quot;sections&quot;: [ { &quot;header&quot;: &quot;Contact Info&quot;, &quot;collapsible&quot;: true, &quot;uncollapsibleWidgetsCount&quot;: 1, &quot;widgets&quot;: [ { &quot;decoratedText&quot;: { &quot;startIcon&quot;: { &quot;knownIcon&quot;: &quot;EMAIL&quot;, }, &quot;text&quot;: &quot;sasha@example.com&quot;, } }, { &quot;decoratedText&quot;: { &quot;startIcon&quot;: { &quot;knownIcon&quot;: &quot;PERSON&quot;, }, &quot;text&quot;: &quot;Online&quot;, }, }, { &quot;decoratedText&quot;: { &quot;startIcon&quot;: { &quot;knownIcon&quot;: &quot;PHONE&quot;, }, &quot;text&quot;: &quot;+1 (555) 555-1234&quot;, } }, { &quot;buttonList&quot;: { &quot;buttons&quot;: [ { &quot;text&quot;: &quot;Share&quot;, &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;: &quot;https://example.com/share&quot;, } } }, { &quot;text&quot;: &quot;Edit&quot;, &quot;onClick&quot;: { &quot;action&quot;: { &quot;function&quot;: &quot;goToView&quot;, &quot;parameters&quot;: [ { &quot;key&quot;: &quot;viewType&quot;, &quot;value&quot;: &quot;EDIT&quot;, } ], } } }, ], } }, ], }, ], }, } ], } ``` # Card proto that allows Chat apps to specify UI elements and editable widgets.
        &quot;cardActions&quot;: [ # The card&#x27;s actions. Actions are added to the card&#x27;s toolbar menu. Because Chat app cards have no toolbar, `cardActions[]` is not supported by Chat apps. For example, the following JSON constructs a card action menu with Settings and Send Feedback options: ``` &quot;card_actions&quot;: [ { &quot;actionLabel&quot;: &quot;Settings&quot;, &quot;onClick&quot;: { &quot;action&quot;: { &quot;functionName&quot;: &quot;goToView&quot;, &quot;parameters&quot;: [ { &quot;key&quot;: &quot;viewType&quot;, &quot;value&quot;: &quot;SETTING&quot; } ], &quot;loadIndicator&quot;: &quot;LoadIndicator.SPINNER&quot; } } }, { &quot;actionLabel&quot;: &quot;Send Feedback&quot;, &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;: &quot;https://example.com/feedback&quot; } } } ] ```
          { # A card action is the action associated with the card. For example, an invoice card might include actions such as delete invoice, email invoice, or open the invoice in a browser. Not supported by Chat apps.
            &quot;actionLabel&quot;: &quot;A String&quot;, # The label that displays as the action menu item.
            &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The `onClick` action for this action item.
              &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                &quot;parameters&quot;: [ # List of action parameters.
                  { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                    &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                    &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                  },
                ],
                &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
              },
              &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
              &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                &quot;parameters&quot;: [ # List of action parameters.
                  { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                    &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                    &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                  },
                ],
                &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
              },
              &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                &quot;url&quot;: &quot;A String&quot;, # The URL to open.
              },
            },
          },
        ],
        &quot;displayStyle&quot;: &quot;A String&quot;, # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. Not supported by Chat apps.
        &quot;fixedFooter&quot;: { # A persistent (sticky) footer that that appears at the bottom of the card. Setting `fixedFooter` without specifying a `primaryButton` or a `secondaryButton` causes an error. Chat apps support `fixedFooter` in [dialogs](https://developers.google.com/chat/how-tos/dialogs), but not in [card messages](https://developers.google.com/chat/api/guides/message-formats/cards). # The fixed footer shown at the bottom of this card. Setting `fixedFooter` without specifying a `primaryButton` or a `secondaryButton` causes an error. Chat apps support `fixedFooter` in [dialogs](https://developers.google.com/chat/how-tos/dialogs), but not in [card messages](https://developers.google.com/chat/api/guides/message-formats/cards).
          &quot;primaryButton&quot;: { # A text, icon, or text + icon button that users can click. To make an image a clickable button, specify an Image (not an ImageComponent) and set an `onClick` action. # The primary button of the fixed footer. The button must be a text button with text and color set.
            &quot;altText&quot;: &quot;A String&quot;, # The alternative text used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;. Has no effect when an icon is set; use `icon.alt_text` instead.
            &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background will likely result in white text. If unset, the image background is white and the font color is blue. For red, green and blue, the value of each field is a `float` number that can be expressed in either of two ways: as a number between 0 and 255 divided by 255 (153/255) or as a value between 0 and 1 (0.6). 0 represents the absence of a color and 1 or 255/255 represent the full presence of that color on the RGB scale. Optionally set alpha, which sets a level of transparency using this equation: ``` pixel color = alpha * (this color) + (1.0 - alpha) * (background color) ``` For alpha, a value of 1 corresponds with a solid color, and a value of 0 corresponds with a completely transparent color. For example, the following color represents a half transparent red: ``` &quot;color&quot;: { &quot;red&quot;: 1, &quot;green&quot;: 0, &quot;blue&quot;: 0, &quot;alpha&quot;: 0.5 } ```
              &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
              &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
              &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
              &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
            },
            &quot;disabled&quot;: True or False, # If `true`, the button is displayed in an inactive state and doesn&#x27;t respond to user actions.
            &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon image. If both `icon` and `text` are set, then the icon appears in place of the text. Support for both an icon and text is coming soon.
              &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
              &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
              &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
              &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
            },
            &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The action to perform when the button is clicked, such as opening a hyperlink or running a custom function.
              &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                &quot;parameters&quot;: [ # List of action parameters.
                  { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                    &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                    &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                  },
                ],
                &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
              },
              &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
              &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                &quot;parameters&quot;: [ # List of action parameters.
                  { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                    &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                    &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                  },
                ],
                &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
              },
              &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                &quot;url&quot;: &quot;A String&quot;, # The URL to open.
              },
            },
            &quot;text&quot;: &quot;A String&quot;, # The text displayed inside the button.
          },
          &quot;secondaryButton&quot;: { # A text, icon, or text + icon button that users can click. To make an image a clickable button, specify an Image (not an ImageComponent) and set an `onClick` action. # The secondary button of the fixed footer. The button must be a text button with text and color set. `primaryButton` must be set if `secondaryButton` is set.
            &quot;altText&quot;: &quot;A String&quot;, # The alternative text used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;. Has no effect when an icon is set; use `icon.alt_text` instead.
            &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background will likely result in white text. If unset, the image background is white and the font color is blue. For red, green and blue, the value of each field is a `float` number that can be expressed in either of two ways: as a number between 0 and 255 divided by 255 (153/255) or as a value between 0 and 1 (0.6). 0 represents the absence of a color and 1 or 255/255 represent the full presence of that color on the RGB scale. Optionally set alpha, which sets a level of transparency using this equation: ``` pixel color = alpha * (this color) + (1.0 - alpha) * (background color) ``` For alpha, a value of 1 corresponds with a solid color, and a value of 0 corresponds with a completely transparent color. For example, the following color represents a half transparent red: ``` &quot;color&quot;: { &quot;red&quot;: 1, &quot;green&quot;: 0, &quot;blue&quot;: 0, &quot;alpha&quot;: 0.5 } ```
              &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
              &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
              &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
              &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
            },
            &quot;disabled&quot;: True or False, # If `true`, the button is displayed in an inactive state and doesn&#x27;t respond to user actions.
            &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon image. If both `icon` and `text` are set, then the icon appears in place of the text. Support for both an icon and text is coming soon.
              &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
              &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
              &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
              &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
            },
            &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The action to perform when the button is clicked, such as opening a hyperlink or running a custom function.
              &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                &quot;parameters&quot;: [ # List of action parameters.
                  { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                    &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                    &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                  },
                ],
                &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
              },
              &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
              &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                &quot;parameters&quot;: [ # List of action parameters.
                  { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                    &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                    &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                  },
                ],
                &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
              },
              &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                &quot;url&quot;: &quot;A String&quot;, # The URL to open.
              },
            },
            &quot;text&quot;: &quot;A String&quot;, # The text displayed inside the button.
          },
        },
        &quot;header&quot;: { # Represents a card header. # The header of the card. A header usually contains a leading image and a title. Headers always appear at the top of a card.
          &quot;imageAltText&quot;: &quot;A String&quot;, # The alternative text of this image which is used for accessibility.
          &quot;imageType&quot;: &quot;A String&quot;, # The shape used to crop the image.
          &quot;imageUrl&quot;: &quot;A String&quot;, # The HTTPS URL of the image in the card header.
          &quot;subtitle&quot;: &quot;A String&quot;, # The subtitle of the card header. If specified, appears on its own line below the `title`.
          &quot;title&quot;: &quot;A String&quot;, # Required. The title of the card header. The header has a fixed height: if both a title and subtitle are specified, each takes up one line. If only the title is specified, it takes up both lines.
        },
        &quot;name&quot;: &quot;A String&quot;, # Name of the card. Used as a card identifier in card navigation. Because Chat apps don&#x27;t support card navigation, they ignore this field.
        &quot;peekCardHeader&quot;: { # Represents a card header. # When displaying contextual content, the peek card header acts as a placeholder so that the user can navigate forward between the homepage cards and the contextual cards. Not supported by Chat apps.
          &quot;imageAltText&quot;: &quot;A String&quot;, # The alternative text of this image which is used for accessibility.
          &quot;imageType&quot;: &quot;A String&quot;, # The shape used to crop the image.
          &quot;imageUrl&quot;: &quot;A String&quot;, # The HTTPS URL of the image in the card header.
          &quot;subtitle&quot;: &quot;A String&quot;, # The subtitle of the card header. If specified, appears on its own line below the `title`.
          &quot;title&quot;: &quot;A String&quot;, # Required. The title of the card header. The header has a fixed height: if both a title and subtitle are specified, each takes up one line. If only the title is specified, it takes up both lines.
        },
        &quot;sections&quot;: [ # Contains a collection of widgets. Each section has its own, optional header. Sections are visually separated by a line divider.
          { # A section contains a collection of widgets that are rendered vertically in the order that they are specified.
            &quot;collapsible&quot;: True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
            &quot;header&quot;: &quot;A String&quot;, # Text that appears at the top of a section. Supports [simple HTML formatted text](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
            &quot;uncollapsibleWidgetsCount&quot;: 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
            &quot;widgets&quot;: [ # All the widgets in the section. Must contain at least 1 widget.
              { # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
                &quot;buttonList&quot;: { # A list of buttons layed out horizontally. # A list of buttons. For example, the following JSON creates two buttons. The first is a blue text button and the second is an image button that opens a link: ``` &quot;buttonList&quot;: { &quot;buttons&quot;: [ &quot;button&quot;: { &quot;text&quot;: &quot;Edit&quot;, &quot;color&quot;: { &quot;red&quot;: 0, &quot;green&quot;: 0, &quot;blue&quot;: 1, &quot;alpha&quot;: 1 } &quot;disabled&quot;: true }, &quot;button&quot;: { &quot;icon&quot;: { &quot;knownIcon&quot;: &quot;INVITE&quot; &quot;altText&quot;: &quot;check calendar&quot; }, &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;: &quot;https://example.com/calendar&quot; } } }, ] } ```
                  &quot;buttons&quot;: [ # An array of buttons.
                    { # A text, icon, or text + icon button that users can click. To make an image a clickable button, specify an Image (not an ImageComponent) and set an `onClick` action.
                      &quot;altText&quot;: &quot;A String&quot;, # The alternative text used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;. Has no effect when an icon is set; use `icon.alt_text` instead.
                      &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background will likely result in white text. If unset, the image background is white and the font color is blue. For red, green and blue, the value of each field is a `float` number that can be expressed in either of two ways: as a number between 0 and 255 divided by 255 (153/255) or as a value between 0 and 1 (0.6). 0 represents the absence of a color and 1 or 255/255 represent the full presence of that color on the RGB scale. Optionally set alpha, which sets a level of transparency using this equation: ``` pixel color = alpha * (this color) + (1.0 - alpha) * (background color) ``` For alpha, a value of 1 corresponds with a solid color, and a value of 0 corresponds with a completely transparent color. For example, the following color represents a half transparent red: ``` &quot;color&quot;: { &quot;red&quot;: 1, &quot;green&quot;: 0, &quot;blue&quot;: 0, &quot;alpha&quot;: 0.5 } ```
                        &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                        &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                        &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                        &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                      },
                      &quot;disabled&quot;: True or False, # If `true`, the button is displayed in an inactive state and doesn&#x27;t respond to user actions.
                      &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon image. If both `icon` and `text` are set, then the icon appears in place of the text. Support for both an icon and text is coming soon.
                        &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                        &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                        &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                        &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                      },
                      &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The action to perform when the button is clicked, such as opening a hyperlink or running a custom function.
                        &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                          &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                          &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                          &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                          &quot;parameters&quot;: [ # List of action parameters.
                            { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                              &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                              &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                            },
                          ],
                          &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                        },
                        &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                        &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                          &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                          &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                          &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                          &quot;parameters&quot;: [ # List of action parameters.
                            { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                              &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                              &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                            },
                          ],
                          &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                        },
                        &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                          &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                          &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                          &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                        },
                      },
                      &quot;text&quot;: &quot;A String&quot;, # The text displayed inside the button.
                    },
                  ],
                },
                &quot;dateTimePicker&quot;: { # Lets users specify a date, a time, or both a date and a time. Accepts text input from users, but features an interactive date and time selector that helps users enter correctly-formatted dates and times. If users enter a date or time incorrectly, the widget shows an error that prompts users to enter the correct format. Not supported by Chat apps. Support by Chat apps coming soon. # Displays a selection/input widget for date, time, or date and time. Not supported by Chat apps. Support by Chat apps is coming soon. For example, the following JSON creates a datetime picker to schedule an appointment: ``` &quot;date_time_picker&quot;: { &quot;name&quot;: &quot;appointment_time&quot;, &quot;label&quot;: &quot;Book your appointment at:&quot;, &quot;type&quot;: &quot;DateTimePickerType.DATE_AND_TIME&quot;, &quot;valueMsEpoch&quot;: &quot;796435200000&quot; } ```
                  &quot;label&quot;: &quot;A String&quot;, # The text that prompts users to enter a date, time, or datetime. Specify text that helps the user enter the information your app needs. For example, if users are setting an appointment, then a label like &quot;Appointment date&quot; or &quot;Appointment date and time&quot; might work well.
                  &quot;name&quot;: &quot;A String&quot;, # The name by which the datetime picker is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                  &quot;onChangeAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # Triggered when the user clicks **Save** or **Clear** from the datetime picker interface.
                    &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                    &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                    &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                    &quot;parameters&quot;: [ # List of action parameters.
                      { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                        &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                        &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                      },
                    ],
                    &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                  },
                  &quot;timezoneOffsetDate&quot;: 42, # The number representing the time zone offset from UTC, in minutes. If set, the `value_ms_epoch` is displayed in the specified time zone. If not set, it uses the user&#x27;s time zone setting on the client side.
                  &quot;type&quot;: &quot;A String&quot;, # What kind of date and time input the datetime picker supports.
                  &quot;valueMsEpoch&quot;: &quot;A String&quot;, # The value displayed as the default value before user input or previous user input, represented in milliseconds ([Epoch time](https://en.wikipedia.org/wiki/Unix_time)). For `DATE_AND_TIME` type, the full epoch value is used. For `DATE_ONLY` type, only date of the epoch time is used. For `TIME_ONLY` type, only time of the epoch time is used. For example, to represent 3:00 AM, set epoch time to `3 * 60 * 60 * 1000`.
                },
                &quot;decoratedText&quot;: { # A widget that displays text with optional decorations such as a label above or below the text, an icon in front of the text, a selection widget or a button after the text. # Displays a decorated text item. For example, the following JSON creates a decorated text widget showing email address: ``` &quot;decoratedText&quot;: { &quot;icon&quot;: { &quot;knownIcon&quot;: &quot;EMAIL&quot; }, &quot;topLabel&quot;: &quot;Email Address&quot;, &quot;text&quot;: &quot;sasha@example.com&quot;, &quot;bottomLabel&quot;: &quot;This is a new Email address!&quot;, &quot;switchWidget&quot;: { &quot;name&quot;: &quot;has_send_welcome_email_to_sasha&quot;, &quot;selected&quot;: false, &quot;controlType&quot;: &quot;ControlType.CHECKBOX&quot; } } ```
                  &quot;bottomLabel&quot;: &quot;A String&quot;, # The text that appears below `text`. Always truncates. Supports simple formatting. See Text formatting for formatting details.
                  &quot;button&quot;: { # A text, icon, or text + icon button that users can click. To make an image a clickable button, specify an Image (not an ImageComponent) and set an `onClick` action. # A button that can be clicked to trigger an action.
                    &quot;altText&quot;: &quot;A String&quot;, # The alternative text used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;. Has no effect when an icon is set; use `icon.alt_text` instead.
                    &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background will likely result in white text. If unset, the image background is white and the font color is blue. For red, green and blue, the value of each field is a `float` number that can be expressed in either of two ways: as a number between 0 and 255 divided by 255 (153/255) or as a value between 0 and 1 (0.6). 0 represents the absence of a color and 1 or 255/255 represent the full presence of that color on the RGB scale. Optionally set alpha, which sets a level of transparency using this equation: ``` pixel color = alpha * (this color) + (1.0 - alpha) * (background color) ``` For alpha, a value of 1 corresponds with a solid color, and a value of 0 corresponds with a completely transparent color. For example, the following color represents a half transparent red: ``` &quot;color&quot;: { &quot;red&quot;: 1, &quot;green&quot;: 0, &quot;blue&quot;: 0, &quot;alpha&quot;: 0.5 } ```
                      &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                      &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    &quot;disabled&quot;: True or False, # If `true`, the button is displayed in an inactive state and doesn&#x27;t respond to user actions.
                    &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon image. If both `icon` and `text` are set, then the icon appears in place of the text. Support for both an icon and text is coming soon.
                      &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                      &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                      &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                      &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                    },
                    &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The action to perform when the button is clicked, such as opening a hyperlink or running a custom function.
                      &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                        &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                        &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                        &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                        &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                      },
                      &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                      &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                        &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                        &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                        &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                        &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                      },
                      &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                        &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                        &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                        &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                      },
                    },
                    &quot;text&quot;: &quot;A String&quot;, # The text displayed inside the button.
                  },
                  &quot;endIcon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # An icon displayed after the text. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards#builtinicons) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons.
                    &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                    &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                    &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                    &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                  },
                  &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # Deprecated in favor of `startIcon`.
                    &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                    &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                    &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                    &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                  },
                  &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # When users click on `topLabel` or `bottomLabel`, this action triggers.
                    &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                    &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                      &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                      &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                      &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                    },
                  },
                  &quot;startIcon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon displayed in front of the text.
                    &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                    &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                    &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                    &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                  },
                  &quot;switchControl&quot;: { # Either a toggle-style switch or a checkbox inside a `decoratedText` widget. Only supported on the `decoratedText` widget. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. # A switch widget can be clicked to change its state and trigger an action. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon.
                    &quot;controlType&quot;: &quot;A String&quot;, # How the switch appears in the user interface.
                    &quot;name&quot;: &quot;A String&quot;, # The name by which the switch widget is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                    &quot;onChangeAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # The action to perform when the switch state is changed, such as what function to run.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;selected&quot;: True or False, # When `true`, the switch is selected.
                    &quot;value&quot;: &quot;A String&quot;, # The value entered by a user, returned as part of a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                  },
                  &quot;text&quot;: &quot;A String&quot;, # Required. The primary text. Supports simple formatting. See Text formatting for formatting details.
                  &quot;topLabel&quot;: &quot;A String&quot;, # The text that appears above `text`. Always truncates. Supports simple formatting. See Text formatting for formatting details.
                  &quot;wrapText&quot;: True or False, # The wrap text setting. If `true`, the text wraps and displays on multiple lines. Otherwise, the text is truncated. Only applies to `text`, not `topLabel` and `bottomLabel`.
                },
                &quot;divider&quot;: { # Displays a divider between widgets, a horizontal line. For example, the following JSON creates a divider: ``` &quot;divider&quot;: { } ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` &quot;divider&quot;: { } ```
                },
                &quot;grid&quot;: { # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by items divided by columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. For example, the following JSON creates a 2 column grid with a single item: ``` &quot;grid&quot;: { &quot;title&quot;: &quot;A fine collection of items&quot;, &quot;numColumns&quot;: 2, &quot;borderStyle&quot;: { &quot;type&quot;: &quot;STROKE&quot;, &quot;cornerRadius&quot;: 4.0 }, &quot;items&quot;: [ &quot;image&quot;: { &quot;imageUri&quot;: &quot;https://www.example.com/image.png&quot;, &quot;cropStyle&quot;: { &quot;type&quot;: &quot;SQUARE&quot; }, &quot;borderStyle&quot;: { &quot;type&quot;: &quot;STROKE&quot; } }, &quot;title&quot;: &quot;An item&quot;, &quot;textAlignment&quot;: &quot;CENTER&quot; ], &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;:&quot;https://www.example.com&quot; } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. For example, the following JSON creates a 2 column grid with a single item: ``` &quot;grid&quot;: { &quot;title&quot;: &quot;A fine collection of items&quot;, &quot;numColumns&quot;: 2, &quot;borderStyle&quot;: { &quot;type&quot;: &quot;STROKE&quot;, &quot;cornerRadius&quot;: 4.0 }, &quot;items&quot;: [ &quot;image&quot;: { &quot;imageUri&quot;: &quot;https://www.example.com/image.png&quot;, &quot;cropStyle&quot;: { &quot;type&quot;: &quot;SQUARE&quot; }, &quot;borderStyle&quot;: { &quot;type&quot;: &quot;STROKE&quot; } }, &quot;title&quot;: &quot;An item&quot;, &quot;textAlignment&quot;: &quot;CENTER&quot; ], &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;:&quot;https://www.example.com&quot; } } } ```
                  &quot;borderStyle&quot;: { # Represents the complete border style applied to items in a widget. # The border style to apply to each grid item.
                    &quot;cornerRadius&quot;: 42, # The corner radius for the border.
                    &quot;strokeColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The colors to use when the type is `BORDER_TYPE_STROKE`.
                      &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                      &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    &quot;type&quot;: &quot;A String&quot;, # The border type.
                  },
                  &quot;columnCount&quot;: 42, # The number of columns to display in the grid. A default value is used if this field isn&#x27;t specified, and that default value is different depending on where the grid is shown (dialog versus companion).
                  &quot;items&quot;: [ # The items to display in the grid.
                    { # Represents a single item in the grid layout.
                      &quot;id&quot;: &quot;A String&quot;, # A user-specified identifier for this grid item. This identifier is returned in the parent Grid&#x27;s onClick callback parameters.
                      &quot;image&quot;: { # Represents an image. # The image that displays in the grid item.
                        &quot;altText&quot;: &quot;A String&quot;, # The accessibility label for the image.
                        &quot;borderStyle&quot;: { # Represents the complete border style applied to items in a widget. # The border style to apply to the image.
                          &quot;cornerRadius&quot;: 42, # The corner radius for the border.
                          &quot;strokeColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The colors to use when the type is `BORDER_TYPE_STROKE`.
                            &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                            &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                            &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                            &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                          },
                          &quot;type&quot;: &quot;A String&quot;, # The border type.
                        },
                        &quot;cropStyle&quot;: { # Represents the crop style applied to an image. For example, here&#x27;s how to apply a 16 by 9 aspect ratio: ``` cropStyle { &quot;type&quot;: &quot;RECTANGLE_CUSTOM&quot;, &quot;aspectRatio&quot;: 16/9 } ``` # The crop style to apply to the image.
                          &quot;aspectRatio&quot;: 3.14, # The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. For example, here&#x27;s how to apply a 16 by 9 aspect ratio: ``` cropStyle { &quot;type&quot;: &quot;RECTANGLE_CUSTOM&quot;, &quot;aspectRatio&quot;: 16/9 } ```
                          &quot;type&quot;: &quot;A String&quot;, # The crop type.
                        },
                        &quot;imageUri&quot;: &quot;A String&quot;, # The image URL.
                      },
                      &quot;layout&quot;: &quot;A String&quot;, # The layout to use for the grid item.
                      &quot;subtitle&quot;: &quot;A String&quot;, # The grid item&#x27;s subtitle.
                      &quot;title&quot;: &quot;A String&quot;, # The grid item&#x27;s title.
                    },
                  ],
                  &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # This callback is reused by each individual grid item, but with the item&#x27;s identifier and index in the items list added to the callback&#x27;s parameters.
                    &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                    &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                      &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                      &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                      &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                    },
                  },
                  &quot;title&quot;: &quot;A String&quot;, # The text that displays in the grid header.
                },
                &quot;image&quot;: { # An image that is specified by a URL and can have an `onClick` action. # Displays an image. For example, the following JSON creates an image with alternative text: ``` &quot;image&quot;: { &quot;imageUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; &quot;altText&quot;: &quot;Chat app avatar&quot; } ```
                  &quot;altText&quot;: &quot;A String&quot;, # The alternative text of this image, used for accessibility.
                  &quot;imageUrl&quot;: &quot;A String&quot;, # The `https` URL that hosts the image. For example: ``` https://developers.google.com/chat/images/quickstart-app-avatar.png ```
                  &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # When a user clicks on the image, the click triggers this action.
                    &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                    &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                      &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                      &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                      &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                    },
                  },
                },
                &quot;selectionInput&quot;: { # A widget that creates a UI item with options for users to select. For example, a dropdown menu or check list. Chat apps receive and can process the value of entered text during form input events. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs). When you need to collect data from users that matches options you set, use a selection input. To collect abstract data from users, use the text input widget instead. Only supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) coming soon. # Displays a selection control that lets users select items. Selection controls can be check boxes, radio buttons, switches, or dropdown menus. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` &quot;selectionInput&quot;: { &quot;name&quot;: &quot;size&quot;, &quot;label&quot;: &quot;Size&quot; &quot;type&quot;: &quot;SelectionType.DROPDOWN&quot;, &quot;items&quot;: [ { &quot;text&quot;: &quot;S&quot;, &quot;value&quot;: &quot;small&quot;, &quot;selected&quot;: false }, { &quot;text&quot;: &quot;M&quot;, &quot;value&quot;: &quot;medium&quot;, &quot;selected&quot;: true }, { &quot;text&quot;: &quot;L&quot;, &quot;value&quot;: &quot;large&quot;, &quot;selected&quot;: false }, { &quot;text&quot;: &quot;XL&quot;, &quot;value&quot;: &quot;extra_large&quot;, &quot;selected&quot;: false } ] } ```
                  &quot;items&quot;: [ # An array of the selected items. For example, all the selected check boxes.
                    { # A selectable item in a selection input, such as a check box or a switch.
                      &quot;selected&quot;: True or False, # When `true`, more than one item is selected. If more than one item is selected for radio buttons and dropdown menus, the first selected item is received and the ones after are ignored.
                      &quot;text&quot;: &quot;A String&quot;, # The text displayed to users.
                      &quot;value&quot;: &quot;A String&quot;, # The value associated with this item. The client should use this as a form input value. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                    },
                  ],
                  &quot;label&quot;: &quot;A String&quot;, # The text that appears above the selection input field in the user interface. Specify text that helps the user enter the information your app needs. For example, if users are selecting the urgency of a work ticket from a drop-down menu, the label might be &quot;Urgency&quot; or &quot;Select urgency&quot;.
                  &quot;name&quot;: &quot;A String&quot;, # The name by which the selection input is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                  &quot;onChangeAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, the form is submitted when the selection changes. If not specified, you must specify a separate button that submits the form. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                    &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                    &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                    &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                    &quot;parameters&quot;: [ # List of action parameters.
                      { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                        &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                        &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                      },
                    ],
                    &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                  },
                  &quot;type&quot;: &quot;A String&quot;, # The way that an option appears to users. Different options support different types of interactions. For example, users can enable multiple check boxes, but can only select one value from a dropdown menu. Each selection input supports one type of selection. Mixing check boxes and switches, for example, is not supported.
                },
                &quot;textInput&quot;: { # A field in which users can enter text. Supports suggestions and on-change actions. Chat apps receive and can process the value of entered text during form input events. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs). When you need to collect abstract data from users, use a text input. To collect defined data from users, use the selection input widget instead. Only supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) coming soon. # Displays a text box that users can type into. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. For example, the following JSON creates a text input for an email address: ``` &quot;textInput&quot;: { &quot;name&quot;: &quot;mailing_address&quot;, &quot;label&quot;: &quot;Mailing Address&quot; } ``` As another example, the following JSON creates a text input for a programming language with static suggestions: ``` &quot;textInput&quot;: { &quot;name&quot;: &quot;preferred_programing_language&quot;, &quot;label&quot;: &quot;Preferred Language&quot;, &quot;initialSuggestions&quot;: { &quot;items&quot;: [ { &quot;text&quot;: &quot;C++&quot; }, { &quot;text&quot;: &quot;Java&quot; }, { &quot;text&quot;: &quot;JavaScript&quot; }, { &quot;text&quot;: &quot;Python&quot; } ] } } ```
                  &quot;autoCompleteAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # Optional. Specify what action to take when the text input field provides suggestions to users who interact with it. If unspecified, the suggestions are set by `initialSuggestions` and are processed by the client. If specified, the app takes the action specified here, such as running a custom function. Supported by Google Workspace Add-ons, but not Chat apps. Support by Chat apps coming soon.
                    &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                    &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                    &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                    &quot;parameters&quot;: [ # List of action parameters.
                      { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                        &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                        &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                      },
                    ],
                    &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                  },
                  &quot;hintText&quot;: &quot;A String&quot;, # Text that appears inside the text input field meant to assist users by prompting them to enter a certain value. This text is not visible after users begin typing. Required if `label` is unspecified. Otherwise, optional.
                  &quot;initialSuggestions&quot;: { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing &quot;Jav&quot;, the list of suggestions filters to show just Java and JavaScript. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter &quot;javascript&quot; and others &quot;java script&quot;. Suggesting &quot;JavaScript&quot; can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it is set to `MULTIPLE_LINE`. # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing &quot;Jav&quot;, the list of suggestions filters to show just Java and JavaScript. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter &quot;javascript&quot; and others &quot;java script&quot;. Suggesting &quot;JavaScript&quot; can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it is set to `MULTIPLE_LINE`.
                    &quot;items&quot;: [ # A list of suggestions used for autocomplete recommendations in text input fields.
                      { # One suggested value that users can enter in a text input field.
                        &quot;text&quot;: &quot;A String&quot;, # The value of a suggested input to a text input field. This is equivalent to what users would enter themselves.
                      },
                    ],
                  },
                  &quot;label&quot;: &quot;A String&quot;, # The text that appears above the text input field in the user interface. Specify text that helps the user enter the information your app needs. For example, if you are asking someone&#x27;s name, but specifically need their surname, write &quot;surname&quot; instead of &quot;name&quot;. Required if `hintText` is unspecified. Otherwise, optional.
                  &quot;name&quot;: &quot;A String&quot;, # The name by which the text input is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                  &quot;onChangeAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # What to do when a change occurs in the text input field. Examples of changes include a user adding to the field, or deleting text. Examples of actions to take include running a custom function or opening a [dialog](https://developers.google.com/chat/how-tos/dialogs) in Google Chat.
                    &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                    &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                    &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                    &quot;parameters&quot;: [ # List of action parameters.
                      { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                        &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                        &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                      },
                    ],
                    &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                  },
                  &quot;type&quot;: &quot;A String&quot;, # How a text input field appears in the user interface. For example, whether the field is single or multi-line.
                  &quot;value&quot;: &quot;A String&quot;, # The value entered by a user, returned as part of a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                },
                &quot;textParagraph&quot;: { # A paragraph of text that supports formatting. See [Text formatting](https://developers.google.com/workspace/add-ons/concepts/widgets#text_formatting) for details. # Displays a text paragraph. Supports [simple HTML formatted text](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). For example, the following JSON creates a bolded text: ``` &quot;textParagraph&quot;: { &quot;text&quot;: &quot; *bold text*&quot; } ```
                  &quot;text&quot;: &quot;A String&quot;, # The text that&#x27;s shown in the widget.
                },
              },
            ],
          },
        ],
      },
      &quot;cardId&quot;: &quot;A String&quot;, # Required for `cardsV2` messages. Chat app-specified identifier for this widget. Scoped within a message.
    },
  ],
  &quot;clientAssignedMessageId&quot;: &quot;A String&quot;, # A custom name for a Chat message assigned at creation. Must start with `client-` and contain only lowercase letters, numbers, and hyphens up to 63 characters in length. Specify this field to get, update, or delete the message with the specified value. For example usage, see [Name a created message](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message).
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the message was created in Google Chat server.
  &quot;fallbackText&quot;: &quot;A String&quot;, # A plain-text description of the message&#x27;s cards, used when the actual cards cannot be displayed (e.g. mobile notifications).
  &quot;lastUpdateTime&quot;: &quot;A String&quot;, # Output only. The time at which the message was last edited by a user. If the message has never been edited, this field is empty.
  &quot;matchedUrl&quot;: { # A matched url in a Chat message. Chat apps can preview matched URLs. For more information, refer to [Preview links](https://developers.google.com/chat/how-tos/preview-links). # Output only. A URL in `spaces.messages.text` that matches a link preview pattern. For more information, refer to [Preview links](https://developers.google.com/chat/how-tos/preview-links).
    &quot;url&quot;: &quot;A String&quot;, # Output only. The url that was matched.
  },
  &quot;name&quot;: &quot;A String&quot;, # Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`
  &quot;sender&quot;: { # A user in Google Chat. # Output only. The user who created the message.
    &quot;displayName&quot;: &quot;A String&quot;, # Output only. The user&#x27;s display name.
    &quot;domainId&quot;: &quot;A String&quot;, # Unique identifier of the user&#x27;s Google Workspace domain.
    &quot;isAnonymous&quot;: True or False, # Output only. When `true`, the user is deleted or their profile is not visible.
    &quot;name&quot;: &quot;A String&quot;, # Resource name for a Google Chat user. For human users, represents a person in the People API or a user in the Admin SDK Directory API. Format: `users/{user}`
    &quot;type&quot;: &quot;A String&quot;, # User type.
  },
  &quot;slashCommand&quot;: { # A [slash command](https://developers.google.com/chat/how-tos/slash-commands) in Google Chat. # Output only. Slash command information, if applicable.
    &quot;commandId&quot;: &quot;A String&quot;, # The id of the slash command invoked.
  },
  &quot;space&quot;: { # A space in Google Chat. Spaces are conversations between two or more users or 1:1 messages between a user and a Chat app. # The space the message belongs to. When accessed with [user authentication](https://developers.google.com/chat/api/guides/auth/users), only the name of the Space is populated.
    &quot;displayName&quot;: &quot;A String&quot;, # The space&#x27;s display name. For direct messages between humans, this field might be empty.
    &quot;name&quot;: &quot;A String&quot;, # Resource name of the space. Format: spaces/{space}
    &quot;singleUserBotDm&quot;: True or False, # Optional. Whether the space is a DM between a Chat app and a single human.
    &quot;spaceDetails&quot;: { # Details about the space including description and rules. # Details about the space including description and rules.
      &quot;description&quot;: &quot;A String&quot;, # Optional. A description of the space. It could describe the space&#x27;s discussion topic, functional purpose, or participants.
      &quot;guidelines&quot;: &quot;A String&quot;, # Optional. The space&#x27;s rules, expectations, and etiquette.
    },
    &quot;spaceThreadingState&quot;: &quot;A String&quot;, # Output only. The threading state in the Chat space.
    &quot;threaded&quot;: True or False, # Output only. Deprecated: Use `spaceThreadingState` instead. Whether messages are threaded in this space.
    &quot;type&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `singleUserBotDm` or `spaceType` (developer preview) instead. The type of a space.
  },
  &quot;text&quot;: &quot;A String&quot;, # Plain-text body of the message. The first link to an image, video, web page, or other preview-able item generates a preview chip.
  &quot;thread&quot;: { # A thread in Google Chat. # The thread the message belongs to. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).
    &quot;name&quot;: &quot;A String&quot;, # Resource name of the thread. Example: spaces/{space}/threads/{thread}
    &quot;threadKey&quot;: &quot;A String&quot;, # Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). For other requests, this is an output only field.
  },
  &quot;threadReply&quot;: True or False, # Output only. When `true`, the message is a response in a reply thread. When `false`, the message is visible in the space&#x27;s top-level conversation as either the first message of a thread or a message with no threaded replies. If the space doesn&#x27;t support reply in threads, this field is always `false`.
}

  messageId: string, Optional. A custom name for a Chat message assigned at creation. Must start with `client-` and contain only lowercase letters, numbers, and hyphens up to 63 characters in length. Specify this field to get, update, or delete the message with the specified value. For example usage, see [Name a created message](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message).
  messageReplyOption: string, Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.
    Allowed values
      MESSAGE_REPLY_OPTION_UNSPECIFIED - Default. Starts a thread.
      REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD - Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, the message starts a new thread instead.
      REPLY_MESSAGE_OR_FAIL - Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, a NOT_FOUND error is returned instead.
  requestId: string, Optional. A unique request ID for this message. Specifying an existing request ID returns the message created with that ID instead of creating a new message.
  threadKey: string, Optional. Deprecated: Use thread.thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A message in Google Chat.
  &quot;actionResponse&quot;: { # Parameters that a Chat app can use to configure how it&#x27;s response is posted. # Input only. Parameters that a Chat app can use to configure how its response is posted.
    &quot;dialogAction&quot;: { # Contains a [dialog](https://developers.google.com/chat/how-tos/dialogs) and request status code. # Input only. A response to an event related to a [dialog](https://developers.google.com/chat/how-tos/dialogs). Must be accompanied by `ResponseType.Dialog`.
      &quot;actionStatus&quot;: { # Represents the status for a request to either invoke or submit a [dialog](https://developers.google.com/chat/how-tos/dialogs). # Input only. Status for a request to either invoke or submit a [dialog](https://developers.google.com/chat/how-tos/dialogs). Displays a status and message to users, if necessary. For example, in case of an error or success.
        &quot;statusCode&quot;: &quot;A String&quot;, # The status code.
        &quot;userFacingMessage&quot;: &quot;A String&quot;, # The message to send users about the status of their request. If unset, a generic message based on the `status_code` is sent.
      },
      &quot;dialog&quot;: { # Wrapper around the card body of the dialog. # Input only. [Dialog](https://developers.google.com/chat/how-tos/dialogs) for the request.
        &quot;body&quot;: { # Cards support a defined layout, interactive UI elements like buttons, and rich media like images. Use cards to present detailed information, gather information from users, and guide users to take a next step. In Google Chat, cards appear in several places: - As stand-alone messages. - Accompanying a text message, just beneath the text message. - As a [dialog](https://developers.google.com/chat/how-tos/dialogs). The following example JSON creates a &quot;contact card&quot; that features: - A header with the contact&#x27;s name, job title, avatar picture. - A section with the contact information, including formatted text. - Buttons that users can click to share the contact or see more or less info. ![Example contact card](https://developers.google.com/chat/images/card_api_reference.png) ``` { &quot;cardsV2&quot;: [ { &quot;cardId&quot;: &quot;unique-card-id&quot;, &quot;card&quot;: { &quot;header&quot;: { &quot;title&quot;: &quot;Sasha&quot;, &quot;subtitle&quot;: &quot;Software Engineer&quot;, &quot;imageUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot;, &quot;imageType&quot;: &quot;CIRCLE&quot;, &quot;imageAltText&quot;: &quot;Avatar for Sasha&quot;, }, &quot;sections&quot;: [ { &quot;header&quot;: &quot;Contact Info&quot;, &quot;collapsible&quot;: true, &quot;uncollapsibleWidgetsCount&quot;: 1, &quot;widgets&quot;: [ { &quot;decoratedText&quot;: { &quot;startIcon&quot;: { &quot;knownIcon&quot;: &quot;EMAIL&quot;, }, &quot;text&quot;: &quot;sasha@example.com&quot;, } }, { &quot;decoratedText&quot;: { &quot;startIcon&quot;: { &quot;knownIcon&quot;: &quot;PERSON&quot;, }, &quot;text&quot;: &quot;Online&quot;, }, }, { &quot;decoratedText&quot;: { &quot;startIcon&quot;: { &quot;knownIcon&quot;: &quot;PHONE&quot;, }, &quot;text&quot;: &quot;+1 (555) 555-1234&quot;, } }, { &quot;buttonList&quot;: { &quot;buttons&quot;: [ { &quot;text&quot;: &quot;Share&quot;, &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;: &quot;https://example.com/share&quot;, } } }, { &quot;text&quot;: &quot;Edit&quot;, &quot;onClick&quot;: { &quot;action&quot;: { &quot;function&quot;: &quot;goToView&quot;, &quot;parameters&quot;: [ { &quot;key&quot;: &quot;viewType&quot;, &quot;value&quot;: &quot;EDIT&quot;, } ], } } }, ], } }, ], }, ], }, } ], } ``` # Input only. Body of the dialog, which is rendered in a modal. Google Chat apps do not support the following card entities: `DateTimePicker`, `OnChangeAction`.
          &quot;cardActions&quot;: [ # The card&#x27;s actions. Actions are added to the card&#x27;s toolbar menu. Because Chat app cards have no toolbar, `cardActions[]` is not supported by Chat apps. For example, the following JSON constructs a card action menu with Settings and Send Feedback options: ``` &quot;card_actions&quot;: [ { &quot;actionLabel&quot;: &quot;Settings&quot;, &quot;onClick&quot;: { &quot;action&quot;: { &quot;functionName&quot;: &quot;goToView&quot;, &quot;parameters&quot;: [ { &quot;key&quot;: &quot;viewType&quot;, &quot;value&quot;: &quot;SETTING&quot; } ], &quot;loadIndicator&quot;: &quot;LoadIndicator.SPINNER&quot; } } }, { &quot;actionLabel&quot;: &quot;Send Feedback&quot;, &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;: &quot;https://example.com/feedback&quot; } } } ] ```
            { # A card action is the action associated with the card. For example, an invoice card might include actions such as delete invoice, email invoice, or open the invoice in a browser. Not supported by Chat apps.
              &quot;actionLabel&quot;: &quot;A String&quot;, # The label that displays as the action menu item.
              &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The `onClick` action for this action item.
                &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                  &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                  &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                  &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                  &quot;parameters&quot;: [ # List of action parameters.
                    { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                      &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                      &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                    },
                  ],
                  &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                },
                &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                  &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                  &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                  &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                  &quot;parameters&quot;: [ # List of action parameters.
                    { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                      &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                      &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                    },
                  ],
                  &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                },
                &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                  &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                  &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                  &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                },
              },
            },
          ],
          &quot;displayStyle&quot;: &quot;A String&quot;, # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. Not supported by Chat apps.
          &quot;fixedFooter&quot;: { # A persistent (sticky) footer that that appears at the bottom of the card. Setting `fixedFooter` without specifying a `primaryButton` or a `secondaryButton` causes an error. Chat apps support `fixedFooter` in [dialogs](https://developers.google.com/chat/how-tos/dialogs), but not in [card messages](https://developers.google.com/chat/api/guides/message-formats/cards). # The fixed footer shown at the bottom of this card. Setting `fixedFooter` without specifying a `primaryButton` or a `secondaryButton` causes an error. Chat apps support `fixedFooter` in [dialogs](https://developers.google.com/chat/how-tos/dialogs), but not in [card messages](https://developers.google.com/chat/api/guides/message-formats/cards).
            &quot;primaryButton&quot;: { # A text, icon, or text + icon button that users can click. To make an image a clickable button, specify an Image (not an ImageComponent) and set an `onClick` action. # The primary button of the fixed footer. The button must be a text button with text and color set.
              &quot;altText&quot;: &quot;A String&quot;, # The alternative text used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;. Has no effect when an icon is set; use `icon.alt_text` instead.
              &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background will likely result in white text. If unset, the image background is white and the font color is blue. For red, green and blue, the value of each field is a `float` number that can be expressed in either of two ways: as a number between 0 and 255 divided by 255 (153/255) or as a value between 0 and 1 (0.6). 0 represents the absence of a color and 1 or 255/255 represent the full presence of that color on the RGB scale. Optionally set alpha, which sets a level of transparency using this equation: ``` pixel color = alpha * (this color) + (1.0 - alpha) * (background color) ``` For alpha, a value of 1 corresponds with a solid color, and a value of 0 corresponds with a completely transparent color. For example, the following color represents a half transparent red: ``` &quot;color&quot;: { &quot;red&quot;: 1, &quot;green&quot;: 0, &quot;blue&quot;: 0, &quot;alpha&quot;: 0.5 } ```
                &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
              },
              &quot;disabled&quot;: True or False, # If `true`, the button is displayed in an inactive state and doesn&#x27;t respond to user actions.
              &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon image. If both `icon` and `text` are set, then the icon appears in place of the text. Support for both an icon and text is coming soon.
                &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
              },
              &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The action to perform when the button is clicked, such as opening a hyperlink or running a custom function.
                &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                  &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                  &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                  &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                  &quot;parameters&quot;: [ # List of action parameters.
                    { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                      &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                      &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                    },
                  ],
                  &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                },
                &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                  &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                  &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                  &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                  &quot;parameters&quot;: [ # List of action parameters.
                    { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                      &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                      &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                    },
                  ],
                  &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                },
                &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                  &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                  &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                  &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                },
              },
              &quot;text&quot;: &quot;A String&quot;, # The text displayed inside the button.
            },
            &quot;secondaryButton&quot;: { # A text, icon, or text + icon button that users can click. To make an image a clickable button, specify an Image (not an ImageComponent) and set an `onClick` action. # The secondary button of the fixed footer. The button must be a text button with text and color set. `primaryButton` must be set if `secondaryButton` is set.
              &quot;altText&quot;: &quot;A String&quot;, # The alternative text used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;. Has no effect when an icon is set; use `icon.alt_text` instead.
              &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background will likely result in white text. If unset, the image background is white and the font color is blue. For red, green and blue, the value of each field is a `float` number that can be expressed in either of two ways: as a number between 0 and 255 divided by 255 (153/255) or as a value between 0 and 1 (0.6). 0 represents the absence of a color and 1 or 255/255 represent the full presence of that color on the RGB scale. Optionally set alpha, which sets a level of transparency using this equation: ``` pixel color = alpha * (this color) + (1.0 - alpha) * (background color) ``` For alpha, a value of 1 corresponds with a solid color, and a value of 0 corresponds with a completely transparent color. For example, the following color represents a half transparent red: ``` &quot;color&quot;: { &quot;red&quot;: 1, &quot;green&quot;: 0, &quot;blue&quot;: 0, &quot;alpha&quot;: 0.5 } ```
                &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
              },
              &quot;disabled&quot;: True or False, # If `true`, the button is displayed in an inactive state and doesn&#x27;t respond to user actions.
              &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon image. If both `icon` and `text` are set, then the icon appears in place of the text. Support for both an icon and text is coming soon.
                &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
              },
              &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The action to perform when the button is clicked, such as opening a hyperlink or running a custom function.
                &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                  &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                  &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                  &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                  &quot;parameters&quot;: [ # List of action parameters.
                    { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                      &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                      &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                    },
                  ],
                  &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                },
                &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                  &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                  &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                  &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                  &quot;parameters&quot;: [ # List of action parameters.
                    { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                      &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                      &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                    },
                  ],
                  &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                },
                &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                  &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                  &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                  &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                },
              },
              &quot;text&quot;: &quot;A String&quot;, # The text displayed inside the button.
            },
          },
          &quot;header&quot;: { # Represents a card header. # The header of the card. A header usually contains a leading image and a title. Headers always appear at the top of a card.
            &quot;imageAltText&quot;: &quot;A String&quot;, # The alternative text of this image which is used for accessibility.
            &quot;imageType&quot;: &quot;A String&quot;, # The shape used to crop the image.
            &quot;imageUrl&quot;: &quot;A String&quot;, # The HTTPS URL of the image in the card header.
            &quot;subtitle&quot;: &quot;A String&quot;, # The subtitle of the card header. If specified, appears on its own line below the `title`.
            &quot;title&quot;: &quot;A String&quot;, # Required. The title of the card header. The header has a fixed height: if both a title and subtitle are specified, each takes up one line. If only the title is specified, it takes up both lines.
          },
          &quot;name&quot;: &quot;A String&quot;, # Name of the card. Used as a card identifier in card navigation. Because Chat apps don&#x27;t support card navigation, they ignore this field.
          &quot;peekCardHeader&quot;: { # Represents a card header. # When displaying contextual content, the peek card header acts as a placeholder so that the user can navigate forward between the homepage cards and the contextual cards. Not supported by Chat apps.
            &quot;imageAltText&quot;: &quot;A String&quot;, # The alternative text of this image which is used for accessibility.
            &quot;imageType&quot;: &quot;A String&quot;, # The shape used to crop the image.
            &quot;imageUrl&quot;: &quot;A String&quot;, # The HTTPS URL of the image in the card header.
            &quot;subtitle&quot;: &quot;A String&quot;, # The subtitle of the card header. If specified, appears on its own line below the `title`.
            &quot;title&quot;: &quot;A String&quot;, # Required. The title of the card header. The header has a fixed height: if both a title and subtitle are specified, each takes up one line. If only the title is specified, it takes up both lines.
          },
          &quot;sections&quot;: [ # Contains a collection of widgets. Each section has its own, optional header. Sections are visually separated by a line divider.
            { # A section contains a collection of widgets that are rendered vertically in the order that they are specified.
              &quot;collapsible&quot;: True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
              &quot;header&quot;: &quot;A String&quot;, # Text that appears at the top of a section. Supports [simple HTML formatted text](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
              &quot;uncollapsibleWidgetsCount&quot;: 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
              &quot;widgets&quot;: [ # All the widgets in the section. Must contain at least 1 widget.
                { # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
                  &quot;buttonList&quot;: { # A list of buttons layed out horizontally. # A list of buttons. For example, the following JSON creates two buttons. The first is a blue text button and the second is an image button that opens a link: ``` &quot;buttonList&quot;: { &quot;buttons&quot;: [ &quot;button&quot;: { &quot;text&quot;: &quot;Edit&quot;, &quot;color&quot;: { &quot;red&quot;: 0, &quot;green&quot;: 0, &quot;blue&quot;: 1, &quot;alpha&quot;: 1 } &quot;disabled&quot;: true }, &quot;button&quot;: { &quot;icon&quot;: { &quot;knownIcon&quot;: &quot;INVITE&quot; &quot;altText&quot;: &quot;check calendar&quot; }, &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;: &quot;https://example.com/calendar&quot; } } }, ] } ```
                    &quot;buttons&quot;: [ # An array of buttons.
                      { # A text, icon, or text + icon button that users can click. To make an image a clickable button, specify an Image (not an ImageComponent) and set an `onClick` action.
                        &quot;altText&quot;: &quot;A String&quot;, # The alternative text used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;. Has no effect when an icon is set; use `icon.alt_text` instead.
                        &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background will likely result in white text. If unset, the image background is white and the font color is blue. For red, green and blue, the value of each field is a `float` number that can be expressed in either of two ways: as a number between 0 and 255 divided by 255 (153/255) or as a value between 0 and 1 (0.6). 0 represents the absence of a color and 1 or 255/255 represent the full presence of that color on the RGB scale. Optionally set alpha, which sets a level of transparency using this equation: ``` pixel color = alpha * (this color) + (1.0 - alpha) * (background color) ``` For alpha, a value of 1 corresponds with a solid color, and a value of 0 corresponds with a completely transparent color. For example, the following color represents a half transparent red: ``` &quot;color&quot;: { &quot;red&quot;: 1, &quot;green&quot;: 0, &quot;blue&quot;: 0, &quot;alpha&quot;: 0.5 } ```
                          &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                          &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                          &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                          &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                        },
                        &quot;disabled&quot;: True or False, # If `true`, the button is displayed in an inactive state and doesn&#x27;t respond to user actions.
                        &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon image. If both `icon` and `text` are set, then the icon appears in place of the text. Support for both an icon and text is coming soon.
                          &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                          &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                          &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                          &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                        },
                        &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The action to perform when the button is clicked, such as opening a hyperlink or running a custom function.
                          &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                            &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                            &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                            &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                            &quot;parameters&quot;: [ # List of action parameters.
                              { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                                &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                                &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                              },
                            ],
                            &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                          },
                          &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                          &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                            &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                            &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                            &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                            &quot;parameters&quot;: [ # List of action parameters.
                              { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                                &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                                &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                              },
                            ],
                            &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                          },
                          &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                            &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                            &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                            &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                          },
                        },
                        &quot;text&quot;: &quot;A String&quot;, # The text displayed inside the button.
                      },
                    ],
                  },
                  &quot;dateTimePicker&quot;: { # Lets users specify a date, a time, or both a date and a time. Accepts text input from users, but features an interactive date and time selector that helps users enter correctly-formatted dates and times. If users enter a date or time incorrectly, the widget shows an error that prompts users to enter the correct format. Not supported by Chat apps. Support by Chat apps coming soon. # Displays a selection/input widget for date, time, or date and time. Not supported by Chat apps. Support by Chat apps is coming soon. For example, the following JSON creates a datetime picker to schedule an appointment: ``` &quot;date_time_picker&quot;: { &quot;name&quot;: &quot;appointment_time&quot;, &quot;label&quot;: &quot;Book your appointment at:&quot;, &quot;type&quot;: &quot;DateTimePickerType.DATE_AND_TIME&quot;, &quot;valueMsEpoch&quot;: &quot;796435200000&quot; } ```
                    &quot;label&quot;: &quot;A String&quot;, # The text that prompts users to enter a date, time, or datetime. Specify text that helps the user enter the information your app needs. For example, if users are setting an appointment, then a label like &quot;Appointment date&quot; or &quot;Appointment date and time&quot; might work well.
                    &quot;name&quot;: &quot;A String&quot;, # The name by which the datetime picker is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                    &quot;onChangeAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # Triggered when the user clicks **Save** or **Clear** from the datetime picker interface.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;timezoneOffsetDate&quot;: 42, # The number representing the time zone offset from UTC, in minutes. If set, the `value_ms_epoch` is displayed in the specified time zone. If not set, it uses the user&#x27;s time zone setting on the client side.
                    &quot;type&quot;: &quot;A String&quot;, # What kind of date and time input the datetime picker supports.
                    &quot;valueMsEpoch&quot;: &quot;A String&quot;, # The value displayed as the default value before user input or previous user input, represented in milliseconds ([Epoch time](https://en.wikipedia.org/wiki/Unix_time)). For `DATE_AND_TIME` type, the full epoch value is used. For `DATE_ONLY` type, only date of the epoch time is used. For `TIME_ONLY` type, only time of the epoch time is used. For example, to represent 3:00 AM, set epoch time to `3 * 60 * 60 * 1000`.
                  },
                  &quot;decoratedText&quot;: { # A widget that displays text with optional decorations such as a label above or below the text, an icon in front of the text, a selection widget or a button after the text. # Displays a decorated text item. For example, the following JSON creates a decorated text widget showing email address: ``` &quot;decoratedText&quot;: { &quot;icon&quot;: { &quot;knownIcon&quot;: &quot;EMAIL&quot; }, &quot;topLabel&quot;: &quot;Email Address&quot;, &quot;text&quot;: &quot;sasha@example.com&quot;, &quot;bottomLabel&quot;: &quot;This is a new Email address!&quot;, &quot;switchWidget&quot;: { &quot;name&quot;: &quot;has_send_welcome_email_to_sasha&quot;, &quot;selected&quot;: false, &quot;controlType&quot;: &quot;ControlType.CHECKBOX&quot; } } ```
                    &quot;bottomLabel&quot;: &quot;A String&quot;, # The text that appears below `text`. Always truncates. Supports simple formatting. See Text formatting for formatting details.
                    &quot;button&quot;: { # A text, icon, or text + icon button that users can click. To make an image a clickable button, specify an Image (not an ImageComponent) and set an `onClick` action. # A button that can be clicked to trigger an action.
                      &quot;altText&quot;: &quot;A String&quot;, # The alternative text used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;. Has no effect when an icon is set; use `icon.alt_text` instead.
                      &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background will likely result in white text. If unset, the image background is white and the font color is blue. For red, green and blue, the value of each field is a `float` number that can be expressed in either of two ways: as a number between 0 and 255 divided by 255 (153/255) or as a value between 0 and 1 (0.6). 0 represents the absence of a color and 1 or 255/255 represent the full presence of that color on the RGB scale. Optionally set alpha, which sets a level of transparency using this equation: ``` pixel color = alpha * (this color) + (1.0 - alpha) * (background color) ``` For alpha, a value of 1 corresponds with a solid color, and a value of 0 corresponds with a completely transparent color. For example, the following color represents a half transparent red: ``` &quot;color&quot;: { &quot;red&quot;: 1, &quot;green&quot;: 0, &quot;blue&quot;: 0, &quot;alpha&quot;: 0.5 } ```
                        &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                        &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                        &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                        &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                      },
                      &quot;disabled&quot;: True or False, # If `true`, the button is displayed in an inactive state and doesn&#x27;t respond to user actions.
                      &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon image. If both `icon` and `text` are set, then the icon appears in place of the text. Support for both an icon and text is coming soon.
                        &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                        &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                        &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                        &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                      },
                      &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The action to perform when the button is clicked, such as opening a hyperlink or running a custom function.
                        &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                          &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                          &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                          &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                          &quot;parameters&quot;: [ # List of action parameters.
                            { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                              &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                              &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                            },
                          ],
                          &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                        },
                        &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                        &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                          &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                          &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                          &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                          &quot;parameters&quot;: [ # List of action parameters.
                            { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                              &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                              &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                            },
                          ],
                          &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                        },
                        &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                          &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                          &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                          &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                        },
                      },
                      &quot;text&quot;: &quot;A String&quot;, # The text displayed inside the button.
                    },
                    &quot;endIcon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # An icon displayed after the text. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards#builtinicons) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons.
                      &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                      &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                      &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                      &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                    },
                    &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # Deprecated in favor of `startIcon`.
                      &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                      &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                      &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                      &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                    },
                    &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # When users click on `topLabel` or `bottomLabel`, this action triggers.
                      &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                        &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                        &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                        &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                        &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                      },
                      &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                      &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                        &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                        &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                        &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                        &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                      },
                      &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                        &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                        &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                        &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                      },
                    },
                    &quot;startIcon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon displayed in front of the text.
                      &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                      &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                      &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                      &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                    },
                    &quot;switchControl&quot;: { # Either a toggle-style switch or a checkbox inside a `decoratedText` widget. Only supported on the `decoratedText` widget. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. # A switch widget can be clicked to change its state and trigger an action. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon.
                      &quot;controlType&quot;: &quot;A String&quot;, # How the switch appears in the user interface.
                      &quot;name&quot;: &quot;A String&quot;, # The name by which the switch widget is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                      &quot;onChangeAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # The action to perform when the switch state is changed, such as what function to run.
                        &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                        &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                        &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                        &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                      },
                      &quot;selected&quot;: True or False, # When `true`, the switch is selected.
                      &quot;value&quot;: &quot;A String&quot;, # The value entered by a user, returned as part of a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                    },
                    &quot;text&quot;: &quot;A String&quot;, # Required. The primary text. Supports simple formatting. See Text formatting for formatting details.
                    &quot;topLabel&quot;: &quot;A String&quot;, # The text that appears above `text`. Always truncates. Supports simple formatting. See Text formatting for formatting details.
                    &quot;wrapText&quot;: True or False, # The wrap text setting. If `true`, the text wraps and displays on multiple lines. Otherwise, the text is truncated. Only applies to `text`, not `topLabel` and `bottomLabel`.
                  },
                  &quot;divider&quot;: { # Displays a divider between widgets, a horizontal line. For example, the following JSON creates a divider: ``` &quot;divider&quot;: { } ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` &quot;divider&quot;: { } ```
                  },
                  &quot;grid&quot;: { # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by items divided by columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. For example, the following JSON creates a 2 column grid with a single item: ``` &quot;grid&quot;: { &quot;title&quot;: &quot;A fine collection of items&quot;, &quot;numColumns&quot;: 2, &quot;borderStyle&quot;: { &quot;type&quot;: &quot;STROKE&quot;, &quot;cornerRadius&quot;: 4.0 }, &quot;items&quot;: [ &quot;image&quot;: { &quot;imageUri&quot;: &quot;https://www.example.com/image.png&quot;, &quot;cropStyle&quot;: { &quot;type&quot;: &quot;SQUARE&quot; }, &quot;borderStyle&quot;: { &quot;type&quot;: &quot;STROKE&quot; } }, &quot;title&quot;: &quot;An item&quot;, &quot;textAlignment&quot;: &quot;CENTER&quot; ], &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;:&quot;https://www.example.com&quot; } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. For example, the following JSON creates a 2 column grid with a single item: ``` &quot;grid&quot;: { &quot;title&quot;: &quot;A fine collection of items&quot;, &quot;numColumns&quot;: 2, &quot;borderStyle&quot;: { &quot;type&quot;: &quot;STROKE&quot;, &quot;cornerRadius&quot;: 4.0 }, &quot;items&quot;: [ &quot;image&quot;: { &quot;imageUri&quot;: &quot;https://www.example.com/image.png&quot;, &quot;cropStyle&quot;: { &quot;type&quot;: &quot;SQUARE&quot; }, &quot;borderStyle&quot;: { &quot;type&quot;: &quot;STROKE&quot; } }, &quot;title&quot;: &quot;An item&quot;, &quot;textAlignment&quot;: &quot;CENTER&quot; ], &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;:&quot;https://www.example.com&quot; } } } ```
                    &quot;borderStyle&quot;: { # Represents the complete border style applied to items in a widget. # The border style to apply to each grid item.
                      &quot;cornerRadius&quot;: 42, # The corner radius for the border.
                      &quot;strokeColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The colors to use when the type is `BORDER_TYPE_STROKE`.
                        &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                        &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                        &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                        &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                      },
                      &quot;type&quot;: &quot;A String&quot;, # The border type.
                    },
                    &quot;columnCount&quot;: 42, # The number of columns to display in the grid. A default value is used if this field isn&#x27;t specified, and that default value is different depending on where the grid is shown (dialog versus companion).
                    &quot;items&quot;: [ # The items to display in the grid.
                      { # Represents a single item in the grid layout.
                        &quot;id&quot;: &quot;A String&quot;, # A user-specified identifier for this grid item. This identifier is returned in the parent Grid&#x27;s onClick callback parameters.
                        &quot;image&quot;: { # Represents an image. # The image that displays in the grid item.
                          &quot;altText&quot;: &quot;A String&quot;, # The accessibility label for the image.
                          &quot;borderStyle&quot;: { # Represents the complete border style applied to items in a widget. # The border style to apply to the image.
                            &quot;cornerRadius&quot;: 42, # The corner radius for the border.
                            &quot;strokeColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The colors to use when the type is `BORDER_TYPE_STROKE`.
                              &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                              &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                              &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                              &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                            },
                            &quot;type&quot;: &quot;A String&quot;, # The border type.
                          },
                          &quot;cropStyle&quot;: { # Represents the crop style applied to an image. For example, here&#x27;s how to apply a 16 by 9 aspect ratio: ``` cropStyle { &quot;type&quot;: &quot;RECTANGLE_CUSTOM&quot;, &quot;aspectRatio&quot;: 16/9 } ``` # The crop style to apply to the image.
                            &quot;aspectRatio&quot;: 3.14, # The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. For example, here&#x27;s how to apply a 16 by 9 aspect ratio: ``` cropStyle { &quot;type&quot;: &quot;RECTANGLE_CUSTOM&quot;, &quot;aspectRatio&quot;: 16/9 } ```
                            &quot;type&quot;: &quot;A String&quot;, # The crop type.
                          },
                          &quot;imageUri&quot;: &quot;A String&quot;, # The image URL.
                        },
                        &quot;layout&quot;: &quot;A String&quot;, # The layout to use for the grid item.
                        &quot;subtitle&quot;: &quot;A String&quot;, # The grid item&#x27;s subtitle.
                        &quot;title&quot;: &quot;A String&quot;, # The grid item&#x27;s title.
                      },
                    ],
                    &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # This callback is reused by each individual grid item, but with the item&#x27;s identifier and index in the items list added to the callback&#x27;s parameters.
                      &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                        &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                        &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                        &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                        &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                      },
                      &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                      &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                        &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                        &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                        &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                        &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                      },
                      &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                        &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                        &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                        &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                      },
                    },
                    &quot;title&quot;: &quot;A String&quot;, # The text that displays in the grid header.
                  },
                  &quot;image&quot;: { # An image that is specified by a URL and can have an `onClick` action. # Displays an image. For example, the following JSON creates an image with alternative text: ``` &quot;image&quot;: { &quot;imageUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; &quot;altText&quot;: &quot;Chat app avatar&quot; } ```
                    &quot;altText&quot;: &quot;A String&quot;, # The alternative text of this image, used for accessibility.
                    &quot;imageUrl&quot;: &quot;A String&quot;, # The `https` URL that hosts the image. For example: ``` https://developers.google.com/chat/images/quickstart-app-avatar.png ```
                    &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # When a user clicks on the image, the click triggers this action.
                      &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                        &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                        &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                        &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                        &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                      },
                      &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                      &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                        &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                        &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                        &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                        &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                      },
                      &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                        &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                        &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                        &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                      },
                    },
                  },
                  &quot;selectionInput&quot;: { # A widget that creates a UI item with options for users to select. For example, a dropdown menu or check list. Chat apps receive and can process the value of entered text during form input events. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs). When you need to collect data from users that matches options you set, use a selection input. To collect abstract data from users, use the text input widget instead. Only supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) coming soon. # Displays a selection control that lets users select items. Selection controls can be check boxes, radio buttons, switches, or dropdown menus. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` &quot;selectionInput&quot;: { &quot;name&quot;: &quot;size&quot;, &quot;label&quot;: &quot;Size&quot; &quot;type&quot;: &quot;SelectionType.DROPDOWN&quot;, &quot;items&quot;: [ { &quot;text&quot;: &quot;S&quot;, &quot;value&quot;: &quot;small&quot;, &quot;selected&quot;: false }, { &quot;text&quot;: &quot;M&quot;, &quot;value&quot;: &quot;medium&quot;, &quot;selected&quot;: true }, { &quot;text&quot;: &quot;L&quot;, &quot;value&quot;: &quot;large&quot;, &quot;selected&quot;: false }, { &quot;text&quot;: &quot;XL&quot;, &quot;value&quot;: &quot;extra_large&quot;, &quot;selected&quot;: false } ] } ```
                    &quot;items&quot;: [ # An array of the selected items. For example, all the selected check boxes.
                      { # A selectable item in a selection input, such as a check box or a switch.
                        &quot;selected&quot;: True or False, # When `true`, more than one item is selected. If more than one item is selected for radio buttons and dropdown menus, the first selected item is received and the ones after are ignored.
                        &quot;text&quot;: &quot;A String&quot;, # The text displayed to users.
                        &quot;value&quot;: &quot;A String&quot;, # The value associated with this item. The client should use this as a form input value. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                      },
                    ],
                    &quot;label&quot;: &quot;A String&quot;, # The text that appears above the selection input field in the user interface. Specify text that helps the user enter the information your app needs. For example, if users are selecting the urgency of a work ticket from a drop-down menu, the label might be &quot;Urgency&quot; or &quot;Select urgency&quot;.
                    &quot;name&quot;: &quot;A String&quot;, # The name by which the selection input is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                    &quot;onChangeAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, the form is submitted when the selection changes. If not specified, you must specify a separate button that submits the form. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;type&quot;: &quot;A String&quot;, # The way that an option appears to users. Different options support different types of interactions. For example, users can enable multiple check boxes, but can only select one value from a dropdown menu. Each selection input supports one type of selection. Mixing check boxes and switches, for example, is not supported.
                  },
                  &quot;textInput&quot;: { # A field in which users can enter text. Supports suggestions and on-change actions. Chat apps receive and can process the value of entered text during form input events. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs). When you need to collect abstract data from users, use a text input. To collect defined data from users, use the selection input widget instead. Only supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) coming soon. # Displays a text box that users can type into. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. For example, the following JSON creates a text input for an email address: ``` &quot;textInput&quot;: { &quot;name&quot;: &quot;mailing_address&quot;, &quot;label&quot;: &quot;Mailing Address&quot; } ``` As another example, the following JSON creates a text input for a programming language with static suggestions: ``` &quot;textInput&quot;: { &quot;name&quot;: &quot;preferred_programing_language&quot;, &quot;label&quot;: &quot;Preferred Language&quot;, &quot;initialSuggestions&quot;: { &quot;items&quot;: [ { &quot;text&quot;: &quot;C++&quot; }, { &quot;text&quot;: &quot;Java&quot; }, { &quot;text&quot;: &quot;JavaScript&quot; }, { &quot;text&quot;: &quot;Python&quot; } ] } } ```
                    &quot;autoCompleteAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # Optional. Specify what action to take when the text input field provides suggestions to users who interact with it. If unspecified, the suggestions are set by `initialSuggestions` and are processed by the client. If specified, the app takes the action specified here, such as running a custom function. Supported by Google Workspace Add-ons, but not Chat apps. Support by Chat apps coming soon.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;hintText&quot;: &quot;A String&quot;, # Text that appears inside the text input field meant to assist users by prompting them to enter a certain value. This text is not visible after users begin typing. Required if `label` is unspecified. Otherwise, optional.
                    &quot;initialSuggestions&quot;: { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing &quot;Jav&quot;, the list of suggestions filters to show just Java and JavaScript. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter &quot;javascript&quot; and others &quot;java script&quot;. Suggesting &quot;JavaScript&quot; can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it is set to `MULTIPLE_LINE`. # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing &quot;Jav&quot;, the list of suggestions filters to show just Java and JavaScript. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter &quot;javascript&quot; and others &quot;java script&quot;. Suggesting &quot;JavaScript&quot; can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it is set to `MULTIPLE_LINE`.
                      &quot;items&quot;: [ # A list of suggestions used for autocomplete recommendations in text input fields.
                        { # One suggested value that users can enter in a text input field.
                          &quot;text&quot;: &quot;A String&quot;, # The value of a suggested input to a text input field. This is equivalent to what users would enter themselves.
                        },
                      ],
                    },
                    &quot;label&quot;: &quot;A String&quot;, # The text that appears above the text input field in the user interface. Specify text that helps the user enter the information your app needs. For example, if you are asking someone&#x27;s name, but specifically need their surname, write &quot;surname&quot; instead of &quot;name&quot;. Required if `hintText` is unspecified. Otherwise, optional.
                    &quot;name&quot;: &quot;A String&quot;, # The name by which the text input is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                    &quot;onChangeAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # What to do when a change occurs in the text input field. Examples of changes include a user adding to the field, or deleting text. Examples of actions to take include running a custom function or opening a [dialog](https://developers.google.com/chat/how-tos/dialogs) in Google Chat.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;type&quot;: &quot;A String&quot;, # How a text input field appears in the user interface. For example, whether the field is single or multi-line.
                    &quot;value&quot;: &quot;A String&quot;, # The value entered by a user, returned as part of a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                  },
                  &quot;textParagraph&quot;: { # A paragraph of text that supports formatting. See [Text formatting](https://developers.google.com/workspace/add-ons/concepts/widgets#text_formatting) for details. # Displays a text paragraph. Supports [simple HTML formatted text](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). For example, the following JSON creates a bolded text: ``` &quot;textParagraph&quot;: { &quot;text&quot;: &quot; *bold text*&quot; } ```
                    &quot;text&quot;: &quot;A String&quot;, # The text that&#x27;s shown in the widget.
                  },
                },
              ],
            },
          ],
        },
      },
    },
    &quot;type&quot;: &quot;A String&quot;, # Input only. The type of Chat app response.
    &quot;url&quot;: &quot;A String&quot;, # Input only. URL for users to auth or config. (Only for REQUEST_CONFIG response types.)
  },
  &quot;annotations&quot;: [ # Output only. Annotations associated with the text in this message.
    { # Annotations associated with the plain-text body of the message. Example plain-text message body: ``` Hello @FooBot how are you!&quot; ``` The corresponding annotations metadata: ``` &quot;annotations&quot;:[{ &quot;type&quot;:&quot;USER_MENTION&quot;, &quot;startIndex&quot;:6, &quot;length&quot;:7, &quot;userMention&quot;: { &quot;user&quot;: { &quot;name&quot;:&quot;users/107946847022116401880&quot;, &quot;displayName&quot;:&quot;FooBot&quot;, &quot;avatarUrl&quot;:&quot;https://goo.gl/aeDtrS&quot;, &quot;type&quot;:&quot;BOT&quot; }, &quot;type&quot;:&quot;MENTION&quot; } }] ```
      &quot;length&quot;: 42, # Length of the substring in the plain-text message body this annotation corresponds to.
      &quot;slashCommand&quot;: { # Annotation metadata for slash commands (/). # The metadata for a slash command.
        &quot;bot&quot;: { # A user in Google Chat. # The Chat app whose command was invoked.
          &quot;displayName&quot;: &quot;A String&quot;, # Output only. The user&#x27;s display name.
          &quot;domainId&quot;: &quot;A String&quot;, # Unique identifier of the user&#x27;s Google Workspace domain.
          &quot;isAnonymous&quot;: True or False, # Output only. When `true`, the user is deleted or their profile is not visible.
          &quot;name&quot;: &quot;A String&quot;, # Resource name for a Google Chat user. For human users, represents a person in the People API or a user in the Admin SDK Directory API. Format: `users/{user}`
          &quot;type&quot;: &quot;A String&quot;, # User type.
        },
        &quot;commandId&quot;: &quot;A String&quot;, # The command id of the invoked slash command.
        &quot;commandName&quot;: &quot;A String&quot;, # The name of the invoked slash command.
        &quot;triggersDialog&quot;: True or False, # Indicating whether the slash command is for a dialog.
        &quot;type&quot;: &quot;A String&quot;, # The type of slash command.
      },
      &quot;startIndex&quot;: 42, # Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to.
      &quot;type&quot;: &quot;A String&quot;, # The type of this annotation.
      &quot;userMention&quot;: { # Annotation metadata for user mentions (@). # The metadata of user mention.
        &quot;type&quot;: &quot;A String&quot;, # The type of user mention.
        &quot;user&quot;: { # A user in Google Chat. # The user mentioned.
          &quot;displayName&quot;: &quot;A String&quot;, # Output only. The user&#x27;s display name.
          &quot;domainId&quot;: &quot;A String&quot;, # Unique identifier of the user&#x27;s Google Workspace domain.
          &quot;isAnonymous&quot;: True or False, # Output only. When `true`, the user is deleted or their profile is not visible.
          &quot;name&quot;: &quot;A String&quot;, # Resource name for a Google Chat user. For human users, represents a person in the People API or a user in the Admin SDK Directory API. Format: `users/{user}`
          &quot;type&quot;: &quot;A String&quot;, # User type.
        },
      },
    },
  ],
  &quot;argumentText&quot;: &quot;A String&quot;, # Plain-text body of the message with all Chat app mentions stripped out.
  &quot;attachment&quot;: [ # User uploaded attachment.
    { # An attachment in Google Chat.
      &quot;attachmentDataRef&quot;: { # A reference to the attachment data. This is used with the media API to download the attachment data.
        &quot;resourceName&quot;: &quot;A String&quot;, # The resource name of the attachment data. This is used with the media API to download the attachment data.
      },
      &quot;contentName&quot;: &quot;A String&quot;, # The original file name for the content, not the full path.
      &quot;contentType&quot;: &quot;A String&quot;, # The content type (MIME type) of the file.
      &quot;downloadUri&quot;: &quot;A String&quot;, # Output only. The download URL which should be used to allow a human user to download the attachment. Chat apps should not use this URL to download attachment content.
      &quot;driveDataRef&quot;: { # A reference to the data of a drive attachment. # A reference to the drive attachment. This is used with the Drive API.
        &quot;driveFileId&quot;: &quot;A String&quot;, # The id for the drive file, for use with the Drive API.
      },
      &quot;name&quot;: &quot;A String&quot;, # Resource name of the attachment, in the form &quot;spaces/*/messages/*/attachments/*&quot;.
      &quot;source&quot;: &quot;A String&quot;, # The source of the attachment.
      &quot;thumbnailUri&quot;: &quot;A String&quot;, # Output only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps should not use this URL to download attachment content.
    },
  ],
  &quot;cards&quot;: [ # Deprecated: Use `cards_v2` instead. Rich, formatted and interactive cards that can be used to display UI elements such as: formatted texts, buttons, clickable images. Cards are normally displayed below the plain-text body of the message.
    { # A card is a UI element that can contain UI widgets such as texts, images.
      &quot;cardActions&quot;: [ # The actions of this card.
        { # A card action is the action associated with the card. For an invoice card, a typical action would be: delete invoice, email invoice or open the invoice in browser. Not supported by Google Chat apps.
          &quot;actionLabel&quot;: &quot;A String&quot;, # The label used to be displayed in the action menu item.
          &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action for this action item.
            &quot;action&quot;: { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified.
              &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired.
              &quot;parameters&quot;: [ # List of action parameters.
                { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters.
                  &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                  &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                },
              ],
            },
            &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
              &quot;url&quot;: &quot;A String&quot;, # The URL to open.
            },
          },
        },
      ],
      &quot;header&quot;: { # The header of the card. A header usually contains a title and an image.
        &quot;imageStyle&quot;: &quot;A String&quot;, # The image&#x27;s type (e.g. square border or circular border).
        &quot;imageUrl&quot;: &quot;A String&quot;, # The URL of the image in the card header.
        &quot;subtitle&quot;: &quot;A String&quot;, # The subtitle of the card header.
        &quot;title&quot;: &quot;A String&quot;, # The title must be specified. The header has a fixed height: if both a title and subtitle is specified, each will take up 1 line. If only the title is specified, it will take up both lines.
      },
      &quot;name&quot;: &quot;A String&quot;, # Name of the card.
      &quot;sections&quot;: [ # Sections are separated by a line divider.
        { # A section contains a collection of widgets that are rendered (vertically) in the order that they are specified. Across all platforms, cards have a narrow fixed width, so there is currently no need for layout properties (e.g. float).
          &quot;header&quot;: &quot;A String&quot;, # The header of the section, text formatted supported.
          &quot;widgets&quot;: [ # A section must contain at least 1 widget.
            { # A widget is a UI element that presents texts, images, etc.
              &quot;buttons&quot;: [ # A list of buttons. Buttons is also oneof data and only one of these fields should be set.
                { # A button. Can be a text button or an image button.
                  &quot;imageButton&quot;: { # An image button with an onclick action. # A button with image and onclick action.
                    &quot;icon&quot;: &quot;A String&quot;, # The icon specified by an enum that indices to an icon provided by Chat API.
                    &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
                    &quot;name&quot;: &quot;A String&quot;, # The name of this image_button which will be used for accessibility. Default value will be provided if developers don&#x27;t specify.
                    &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
                      &quot;action&quot;: { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified.
                        &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters.
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                      },
                      &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
                        &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                      },
                    },
                  },
                  &quot;textButton&quot;: { # A button with text and onclick action. # A button with text and onclick action.
                    &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action of the button.
                      &quot;action&quot;: { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified.
                        &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters.
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                      },
                      &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
                        &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                      },
                    },
                    &quot;text&quot;: &quot;A String&quot;, # The text of the button.
                  },
                },
              ],
              &quot;image&quot;: { # An image that is specified by a URL and can have an onclick action. # Display an image in this widget.
                &quot;aspectRatio&quot;: 3.14, # The aspect ratio of this image (width/height). This field allows clients to reserve the right height for the image while waiting for it to load. It&#x27;s not meant to override the native aspect ratio of the image. If unset, the server fills it by prefetching the image.
                &quot;imageUrl&quot;: &quot;A String&quot;, # The URL of the image.
                &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
                  &quot;action&quot;: { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified.
                    &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired.
                    &quot;parameters&quot;: [ # List of action parameters.
                      { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters.
                        &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                        &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                      },
                    ],
                  },
                  &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
                    &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                  },
                },
              },
              &quot;keyValue&quot;: { # A UI element contains a key (label) and a value (content). And this element may also contain some actions such as onclick button. # Display a key value item in this widget.
                &quot;bottomLabel&quot;: &quot;A String&quot;, # The text of the bottom label. Formatted text supported.
                &quot;button&quot;: { # A button. Can be a text button or an image button. # A button that can be clicked to trigger an action.
                  &quot;imageButton&quot;: { # An image button with an onclick action. # A button with image and onclick action.
                    &quot;icon&quot;: &quot;A String&quot;, # The icon specified by an enum that indices to an icon provided by Chat API.
                    &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
                    &quot;name&quot;: &quot;A String&quot;, # The name of this image_button which will be used for accessibility. Default value will be provided if developers don&#x27;t specify.
                    &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
                      &quot;action&quot;: { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified.
                        &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters.
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                      },
                      &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
                        &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                      },
                    },
                  },
                  &quot;textButton&quot;: { # A button with text and onclick action. # A button with text and onclick action.
                    &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action of the button.
                      &quot;action&quot;: { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified.
                        &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters.
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                      },
                      &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
                        &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                      },
                    },
                    &quot;text&quot;: &quot;A String&quot;, # The text of the button.
                  },
                },
                &quot;content&quot;: &quot;A String&quot;, # The text of the content. Formatted text supported and always required.
                &quot;contentMultiline&quot;: True or False, # If the content should be multiline.
                &quot;icon&quot;: &quot;A String&quot;, # An enum value that will be replaced by the Chat API with the corresponding icon image.
                &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
                &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action. Only the top label, bottom label and content region are clickable.
                  &quot;action&quot;: { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified.
                    &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired.
                    &quot;parameters&quot;: [ # List of action parameters.
                      { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters.
                        &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                        &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                      },
                    ],
                  },
                  &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
                    &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                  },
                },
                &quot;topLabel&quot;: &quot;A String&quot;, # The text of the top label. Formatted text supported.
              },
              &quot;textParagraph&quot;: { # A paragraph of text. Formatted text supported. # Display a text paragraph in this widget.
                &quot;text&quot;: &quot;A String&quot;,
              },
            },
          ],
        },
      ],
    },
  ],
  &quot;cardsV2&quot;: [ # Richly formatted and interactive cards that display UI elements and editable widgets, such as: - Formatted text - Buttons - Clickable images - Checkboxes - Radio buttons - Input widgets. Cards are usually displayed below the text-body of a Chat message, but can situationally appear other places, such as [dialogs](https://developers.google.com/chat/how-tos/dialogs). The `cardId` is a unique identifier among cards in the same message and for identifying user input values. Currently supported widgets include: - `TextParagraph` - `DecoratedText` - `Image` - `ButtonList` - `Divider`
    { # Widgets for Chat apps to specify.
      &quot;card&quot;: { # Cards support a defined layout, interactive UI elements like buttons, and rich media like images. Use cards to present detailed information, gather information from users, and guide users to take a next step. In Google Chat, cards appear in several places: - As stand-alone messages. - Accompanying a text message, just beneath the text message. - As a [dialog](https://developers.google.com/chat/how-tos/dialogs). The following example JSON creates a &quot;contact card&quot; that features: - A header with the contact&#x27;s name, job title, avatar picture. - A section with the contact information, including formatted text. - Buttons that users can click to share the contact or see more or less info. ![Example contact card](https://developers.google.com/chat/images/card_api_reference.png) ``` { &quot;cardsV2&quot;: [ { &quot;cardId&quot;: &quot;unique-card-id&quot;, &quot;card&quot;: { &quot;header&quot;: { &quot;title&quot;: &quot;Sasha&quot;, &quot;subtitle&quot;: &quot;Software Engineer&quot;, &quot;imageUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot;, &quot;imageType&quot;: &quot;CIRCLE&quot;, &quot;imageAltText&quot;: &quot;Avatar for Sasha&quot;, }, &quot;sections&quot;: [ { &quot;header&quot;: &quot;Contact Info&quot;, &quot;collapsible&quot;: true, &quot;uncollapsibleWidgetsCount&quot;: 1, &quot;widgets&quot;: [ { &quot;decoratedText&quot;: { &quot;startIcon&quot;: { &quot;knownIcon&quot;: &quot;EMAIL&quot;, }, &quot;text&quot;: &quot;sasha@example.com&quot;, } }, { &quot;decoratedText&quot;: { &quot;startIcon&quot;: { &quot;knownIcon&quot;: &quot;PERSON&quot;, }, &quot;text&quot;: &quot;Online&quot;, }, }, { &quot;decoratedText&quot;: { &quot;startIcon&quot;: { &quot;knownIcon&quot;: &quot;PHONE&quot;, }, &quot;text&quot;: &quot;+1 (555) 555-1234&quot;, } }, { &quot;buttonList&quot;: { &quot;buttons&quot;: [ { &quot;text&quot;: &quot;Share&quot;, &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;: &quot;https://example.com/share&quot;, } } }, { &quot;text&quot;: &quot;Edit&quot;, &quot;onClick&quot;: { &quot;action&quot;: { &quot;function&quot;: &quot;goToView&quot;, &quot;parameters&quot;: [ { &quot;key&quot;: &quot;viewType&quot;, &quot;value&quot;: &quot;EDIT&quot;, } ], } } }, ], } }, ], }, ], }, } ], } ``` # Card proto that allows Chat apps to specify UI elements and editable widgets.
        &quot;cardActions&quot;: [ # The card&#x27;s actions. Actions are added to the card&#x27;s toolbar menu. Because Chat app cards have no toolbar, `cardActions[]` is not supported by Chat apps. For example, the following JSON constructs a card action menu with Settings and Send Feedback options: ``` &quot;card_actions&quot;: [ { &quot;actionLabel&quot;: &quot;Settings&quot;, &quot;onClick&quot;: { &quot;action&quot;: { &quot;functionName&quot;: &quot;goToView&quot;, &quot;parameters&quot;: [ { &quot;key&quot;: &quot;viewType&quot;, &quot;value&quot;: &quot;SETTING&quot; } ], &quot;loadIndicator&quot;: &quot;LoadIndicator.SPINNER&quot; } } }, { &quot;actionLabel&quot;: &quot;Send Feedback&quot;, &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;: &quot;https://example.com/feedback&quot; } } } ] ```
          { # A card action is the action associated with the card. For example, an invoice card might include actions such as delete invoice, email invoice, or open the invoice in a browser. Not supported by Chat apps.
            &quot;actionLabel&quot;: &quot;A String&quot;, # The label that displays as the action menu item.
            &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The `onClick` action for this action item.
              &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                &quot;parameters&quot;: [ # List of action parameters.
                  { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                    &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                    &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                  },
                ],
                &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
              },
              &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
              &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                &quot;parameters&quot;: [ # List of action parameters.
                  { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                    &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                    &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                  },
                ],
                &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
              },
              &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                &quot;url&quot;: &quot;A String&quot;, # The URL to open.
              },
            },
          },
        ],
        &quot;displayStyle&quot;: &quot;A String&quot;, # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. Not supported by Chat apps.
        &quot;fixedFooter&quot;: { # A persistent (sticky) footer that that appears at the bottom of the card. Setting `fixedFooter` without specifying a `primaryButton` or a `secondaryButton` causes an error. Chat apps support `fixedFooter` in [dialogs](https://developers.google.com/chat/how-tos/dialogs), but not in [card messages](https://developers.google.com/chat/api/guides/message-formats/cards). # The fixed footer shown at the bottom of this card. Setting `fixedFooter` without specifying a `primaryButton` or a `secondaryButton` causes an error. Chat apps support `fixedFooter` in [dialogs](https://developers.google.com/chat/how-tos/dialogs), but not in [card messages](https://developers.google.com/chat/api/guides/message-formats/cards).
          &quot;primaryButton&quot;: { # A text, icon, or text + icon button that users can click. To make an image a clickable button, specify an Image (not an ImageComponent) and set an `onClick` action. # The primary button of the fixed footer. The button must be a text button with text and color set.
            &quot;altText&quot;: &quot;A String&quot;, # The alternative text used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;. Has no effect when an icon is set; use `icon.alt_text` instead.
            &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background will likely result in white text. If unset, the image background is white and the font color is blue. For red, green and blue, the value of each field is a `float` number that can be expressed in either of two ways: as a number between 0 and 255 divided by 255 (153/255) or as a value between 0 and 1 (0.6). 0 represents the absence of a color and 1 or 255/255 represent the full presence of that color on the RGB scale. Optionally set alpha, which sets a level of transparency using this equation: ``` pixel color = alpha * (this color) + (1.0 - alpha) * (background color) ``` For alpha, a value of 1 corresponds with a solid color, and a value of 0 corresponds with a completely transparent color. For example, the following color represents a half transparent red: ``` &quot;color&quot;: { &quot;red&quot;: 1, &quot;green&quot;: 0, &quot;blue&quot;: 0, &quot;alpha&quot;: 0.5 } ```
              &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
              &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
              &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
              &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
            },
            &quot;disabled&quot;: True or False, # If `true`, the button is displayed in an inactive state and doesn&#x27;t respond to user actions.
            &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon image. If both `icon` and `text` are set, then the icon appears in place of the text. Support for both an icon and text is coming soon.
              &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
              &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
              &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
              &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
            },
            &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The action to perform when the button is clicked, such as opening a hyperlink or running a custom function.
              &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                &quot;parameters&quot;: [ # List of action parameters.
                  { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                    &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                    &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                  },
                ],
                &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
              },
              &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
              &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                &quot;parameters&quot;: [ # List of action parameters.
                  { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                    &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                    &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                  },
                ],
                &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
              },
              &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                &quot;url&quot;: &quot;A String&quot;, # The URL to open.
              },
            },
            &quot;text&quot;: &quot;A String&quot;, # The text displayed inside the button.
          },
          &quot;secondaryButton&quot;: { # A text, icon, or text + icon button that users can click. To make an image a clickable button, specify an Image (not an ImageComponent) and set an `onClick` action. # The secondary button of the fixed footer. The button must be a text button with text and color set. `primaryButton` must be set if `secondaryButton` is set.
            &quot;altText&quot;: &quot;A String&quot;, # The alternative text used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;. Has no effect when an icon is set; use `icon.alt_text` instead.
            &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background will likely result in white text. If unset, the image background is white and the font color is blue. For red, green and blue, the value of each field is a `float` number that can be expressed in either of two ways: as a number between 0 and 255 divided by 255 (153/255) or as a value between 0 and 1 (0.6). 0 represents the absence of a color and 1 or 255/255 represent the full presence of that color on the RGB scale. Optionally set alpha, which sets a level of transparency using this equation: ``` pixel color = alpha * (this color) + (1.0 - alpha) * (background color) ``` For alpha, a value of 1 corresponds with a solid color, and a value of 0 corresponds with a completely transparent color. For example, the following color represents a half transparent red: ``` &quot;color&quot;: { &quot;red&quot;: 1, &quot;green&quot;: 0, &quot;blue&quot;: 0, &quot;alpha&quot;: 0.5 } ```
              &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
              &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
              &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
              &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
            },
            &quot;disabled&quot;: True or False, # If `true`, the button is displayed in an inactive state and doesn&#x27;t respond to user actions.
            &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon image. If both `icon` and `text` are set, then the icon appears in place of the text. Support for both an icon and text is coming soon.
              &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
              &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
              &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
              &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
            },
            &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The action to perform when the button is clicked, such as opening a hyperlink or running a custom function.
              &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                &quot;parameters&quot;: [ # List of action parameters.
                  { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                    &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                    &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                  },
                ],
                &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
              },
              &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
              &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                &quot;parameters&quot;: [ # List of action parameters.
                  { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                    &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                    &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                  },
                ],
                &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
              },
              &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                &quot;url&quot;: &quot;A String&quot;, # The URL to open.
              },
            },
            &quot;text&quot;: &quot;A String&quot;, # The text displayed inside the button.
          },
        },
        &quot;header&quot;: { # Represents a card header. # The header of the card. A header usually contains a leading image and a title. Headers always appear at the top of a card.
          &quot;imageAltText&quot;: &quot;A String&quot;, # The alternative text of this image which is used for accessibility.
          &quot;imageType&quot;: &quot;A String&quot;, # The shape used to crop the image.
          &quot;imageUrl&quot;: &quot;A String&quot;, # The HTTPS URL of the image in the card header.
          &quot;subtitle&quot;: &quot;A String&quot;, # The subtitle of the card header. If specified, appears on its own line below the `title`.
          &quot;title&quot;: &quot;A String&quot;, # Required. The title of the card header. The header has a fixed height: if both a title and subtitle are specified, each takes up one line. If only the title is specified, it takes up both lines.
        },
        &quot;name&quot;: &quot;A String&quot;, # Name of the card. Used as a card identifier in card navigation. Because Chat apps don&#x27;t support card navigation, they ignore this field.
        &quot;peekCardHeader&quot;: { # Represents a card header. # When displaying contextual content, the peek card header acts as a placeholder so that the user can navigate forward between the homepage cards and the contextual cards. Not supported by Chat apps.
          &quot;imageAltText&quot;: &quot;A String&quot;, # The alternative text of this image which is used for accessibility.
          &quot;imageType&quot;: &quot;A String&quot;, # The shape used to crop the image.
          &quot;imageUrl&quot;: &quot;A String&quot;, # The HTTPS URL of the image in the card header.
          &quot;subtitle&quot;: &quot;A String&quot;, # The subtitle of the card header. If specified, appears on its own line below the `title`.
          &quot;title&quot;: &quot;A String&quot;, # Required. The title of the card header. The header has a fixed height: if both a title and subtitle are specified, each takes up one line. If only the title is specified, it takes up both lines.
        },
        &quot;sections&quot;: [ # Contains a collection of widgets. Each section has its own, optional header. Sections are visually separated by a line divider.
          { # A section contains a collection of widgets that are rendered vertically in the order that they are specified.
            &quot;collapsible&quot;: True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
            &quot;header&quot;: &quot;A String&quot;, # Text that appears at the top of a section. Supports [simple HTML formatted text](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
            &quot;uncollapsibleWidgetsCount&quot;: 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
            &quot;widgets&quot;: [ # All the widgets in the section. Must contain at least 1 widget.
              { # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
                &quot;buttonList&quot;: { # A list of buttons layed out horizontally. # A list of buttons. For example, the following JSON creates two buttons. The first is a blue text button and the second is an image button that opens a link: ``` &quot;buttonList&quot;: { &quot;buttons&quot;: [ &quot;button&quot;: { &quot;text&quot;: &quot;Edit&quot;, &quot;color&quot;: { &quot;red&quot;: 0, &quot;green&quot;: 0, &quot;blue&quot;: 1, &quot;alpha&quot;: 1 } &quot;disabled&quot;: true }, &quot;button&quot;: { &quot;icon&quot;: { &quot;knownIcon&quot;: &quot;INVITE&quot; &quot;altText&quot;: &quot;check calendar&quot; }, &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;: &quot;https://example.com/calendar&quot; } } }, ] } ```
                  &quot;buttons&quot;: [ # An array of buttons.
                    { # A text, icon, or text + icon button that users can click. To make an image a clickable button, specify an Image (not an ImageComponent) and set an `onClick` action.
                      &quot;altText&quot;: &quot;A String&quot;, # The alternative text used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;. Has no effect when an icon is set; use `icon.alt_text` instead.
                      &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background will likely result in white text. If unset, the image background is white and the font color is blue. For red, green and blue, the value of each field is a `float` number that can be expressed in either of two ways: as a number between 0 and 255 divided by 255 (153/255) or as a value between 0 and 1 (0.6). 0 represents the absence of a color and 1 or 255/255 represent the full presence of that color on the RGB scale. Optionally set alpha, which sets a level of transparency using this equation: ``` pixel color = alpha * (this color) + (1.0 - alpha) * (background color) ``` For alpha, a value of 1 corresponds with a solid color, and a value of 0 corresponds with a completely transparent color. For example, the following color represents a half transparent red: ``` &quot;color&quot;: { &quot;red&quot;: 1, &quot;green&quot;: 0, &quot;blue&quot;: 0, &quot;alpha&quot;: 0.5 } ```
                        &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                        &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                        &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                        &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                      },
                      &quot;disabled&quot;: True or False, # If `true`, the button is displayed in an inactive state and doesn&#x27;t respond to user actions.
                      &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon image. If both `icon` and `text` are set, then the icon appears in place of the text. Support for both an icon and text is coming soon.
                        &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                        &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                        &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                        &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                      },
                      &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The action to perform when the button is clicked, such as opening a hyperlink or running a custom function.
                        &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                          &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                          &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                          &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                          &quot;parameters&quot;: [ # List of action parameters.
                            { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                              &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                              &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                            },
                          ],
                          &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                        },
                        &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                        &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                          &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                          &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                          &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                          &quot;parameters&quot;: [ # List of action parameters.
                            { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                              &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                              &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                            },
                          ],
                          &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                        },
                        &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                          &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                          &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                          &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                        },
                      },
                      &quot;text&quot;: &quot;A String&quot;, # The text displayed inside the button.
                    },
                  ],
                },
                &quot;dateTimePicker&quot;: { # Lets users specify a date, a time, or both a date and a time. Accepts text input from users, but features an interactive date and time selector that helps users enter correctly-formatted dates and times. If users enter a date or time incorrectly, the widget shows an error that prompts users to enter the correct format. Not supported by Chat apps. Support by Chat apps coming soon. # Displays a selection/input widget for date, time, or date and time. Not supported by Chat apps. Support by Chat apps is coming soon. For example, the following JSON creates a datetime picker to schedule an appointment: ``` &quot;date_time_picker&quot;: { &quot;name&quot;: &quot;appointment_time&quot;, &quot;label&quot;: &quot;Book your appointment at:&quot;, &quot;type&quot;: &quot;DateTimePickerType.DATE_AND_TIME&quot;, &quot;valueMsEpoch&quot;: &quot;796435200000&quot; } ```
                  &quot;label&quot;: &quot;A String&quot;, # The text that prompts users to enter a date, time, or datetime. Specify text that helps the user enter the information your app needs. For example, if users are setting an appointment, then a label like &quot;Appointment date&quot; or &quot;Appointment date and time&quot; might work well.
                  &quot;name&quot;: &quot;A String&quot;, # The name by which the datetime picker is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                  &quot;onChangeAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # Triggered when the user clicks **Save** or **Clear** from the datetime picker interface.
                    &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                    &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                    &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                    &quot;parameters&quot;: [ # List of action parameters.
                      { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                        &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                        &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                      },
                    ],
                    &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                  },
                  &quot;timezoneOffsetDate&quot;: 42, # The number representing the time zone offset from UTC, in minutes. If set, the `value_ms_epoch` is displayed in the specified time zone. If not set, it uses the user&#x27;s time zone setting on the client side.
                  &quot;type&quot;: &quot;A String&quot;, # What kind of date and time input the datetime picker supports.
                  &quot;valueMsEpoch&quot;: &quot;A String&quot;, # The value displayed as the default value before user input or previous user input, represented in milliseconds ([Epoch time](https://en.wikipedia.org/wiki/Unix_time)). For `DATE_AND_TIME` type, the full epoch value is used. For `DATE_ONLY` type, only date of the epoch time is used. For `TIME_ONLY` type, only time of the epoch time is used. For example, to represent 3:00 AM, set epoch time to `3 * 60 * 60 * 1000`.
                },
                &quot;decoratedText&quot;: { # A widget that displays text with optional decorations such as a label above or below the text, an icon in front of the text, a selection widget or a button after the text. # Displays a decorated text item. For example, the following JSON creates a decorated text widget showing email address: ``` &quot;decoratedText&quot;: { &quot;icon&quot;: { &quot;knownIcon&quot;: &quot;EMAIL&quot; }, &quot;topLabel&quot;: &quot;Email Address&quot;, &quot;text&quot;: &quot;sasha@example.com&quot;, &quot;bottomLabel&quot;: &quot;This is a new Email address!&quot;, &quot;switchWidget&quot;: { &quot;name&quot;: &quot;has_send_welcome_email_to_sasha&quot;, &quot;selected&quot;: false, &quot;controlType&quot;: &quot;ControlType.CHECKBOX&quot; } } ```
                  &quot;bottomLabel&quot;: &quot;A String&quot;, # The text that appears below `text`. Always truncates. Supports simple formatting. See Text formatting for formatting details.
                  &quot;button&quot;: { # A text, icon, or text + icon button that users can click. To make an image a clickable button, specify an Image (not an ImageComponent) and set an `onClick` action. # A button that can be clicked to trigger an action.
                    &quot;altText&quot;: &quot;A String&quot;, # The alternative text used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;. Has no effect when an icon is set; use `icon.alt_text` instead.
                    &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background will likely result in white text. If unset, the image background is white and the font color is blue. For red, green and blue, the value of each field is a `float` number that can be expressed in either of two ways: as a number between 0 and 255 divided by 255 (153/255) or as a value between 0 and 1 (0.6). 0 represents the absence of a color and 1 or 255/255 represent the full presence of that color on the RGB scale. Optionally set alpha, which sets a level of transparency using this equation: ``` pixel color = alpha * (this color) + (1.0 - alpha) * (background color) ``` For alpha, a value of 1 corresponds with a solid color, and a value of 0 corresponds with a completely transparent color. For example, the following color represents a half transparent red: ``` &quot;color&quot;: { &quot;red&quot;: 1, &quot;green&quot;: 0, &quot;blue&quot;: 0, &quot;alpha&quot;: 0.5 } ```
                      &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                      &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    &quot;disabled&quot;: True or False, # If `true`, the button is displayed in an inactive state and doesn&#x27;t respond to user actions.
                    &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon image. If both `icon` and `text` are set, then the icon appears in place of the text. Support for both an icon and text is coming soon.
                      &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                      &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                      &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                      &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                    },
                    &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # The action to perform when the button is clicked, such as opening a hyperlink or running a custom function.
                      &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                        &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                        &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                        &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                        &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                      },
                      &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                      &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                        &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                        &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                        &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                        &quot;parameters&quot;: [ # List of action parameters.
                          { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                            &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                            &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                          },
                        ],
                        &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                      },
                      &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                        &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                        &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                        &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                      },
                    },
                    &quot;text&quot;: &quot;A String&quot;, # The text displayed inside the button.
                  },
                  &quot;endIcon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # An icon displayed after the text. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards#builtinicons) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons.
                    &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                    &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                    &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                    &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                  },
                  &quot;icon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # Deprecated in favor of `startIcon`.
                    &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                    &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                    &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                    &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                  },
                  &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # When users click on `topLabel` or `bottomLabel`, this action triggers.
                    &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                    &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                      &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                      &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                      &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                    },
                  },
                  &quot;startIcon&quot;: { # An icon displayed in a widget on a card. Supports [standard](https://developers.google.com/chat/api/guides/message-formats/cards) and [custom](https://developers.google.com/chat/api/guides/message-formats/cards#customicons) icons. # The icon displayed in front of the text.
                    &quot;altText&quot;: &quot;A String&quot;, # Optional. A description of the icon used for accessibility. If unspecified, a default value is provided. As a best practice, you should set a helpful description. For example, if an icon displays a user&#x27;s account portrait, you could describe it as &quot;A user&#x27;s account portrait.&quot; If the icon displays in a Button, this alt text takes precedence and overwrites the button&#x27;s alt text, so you should write alt text for the button: Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: &quot;Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat&quot;.
                    &quot;iconUrl&quot;: &quot;A String&quot;, # Display a custom icon hosted at an HTTPS URL. For example: ``` &quot;iconUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; ``` Supported file types include `.png` and `.jpg`.
                    &quot;imageType&quot;: &quot;A String&quot;, # The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a standard icon.
                    &quot;knownIcon&quot;: &quot;A String&quot;, # Display one of the standard icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [standard icons](https://developers.google.com/chat/api/guides/message-formats/cards).
                  },
                  &quot;switchControl&quot;: { # Either a toggle-style switch or a checkbox inside a `decoratedText` widget. Only supported on the `decoratedText` widget. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. # A switch widget can be clicked to change its state and trigger an action. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon.
                    &quot;controlType&quot;: &quot;A String&quot;, # How the switch appears in the user interface.
                    &quot;name&quot;: &quot;A String&quot;, # The name by which the switch widget is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                    &quot;onChangeAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # The action to perform when the switch state is changed, such as what function to run.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;selected&quot;: True or False, # When `true`, the switch is selected.
                    &quot;value&quot;: &quot;A String&quot;, # The value entered by a user, returned as part of a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                  },
                  &quot;text&quot;: &quot;A String&quot;, # Required. The primary text. Supports simple formatting. See Text formatting for formatting details.
                  &quot;topLabel&quot;: &quot;A String&quot;, # The text that appears above `text`. Always truncates. Supports simple formatting. See Text formatting for formatting details.
                  &quot;wrapText&quot;: True or False, # The wrap text setting. If `true`, the text wraps and displays on multiple lines. Otherwise, the text is truncated. Only applies to `text`, not `topLabel` and `bottomLabel`.
                },
                &quot;divider&quot;: { # Displays a divider between widgets, a horizontal line. For example, the following JSON creates a divider: ``` &quot;divider&quot;: { } ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` &quot;divider&quot;: { } ```
                },
                &quot;grid&quot;: { # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by items divided by columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. For example, the following JSON creates a 2 column grid with a single item: ``` &quot;grid&quot;: { &quot;title&quot;: &quot;A fine collection of items&quot;, &quot;numColumns&quot;: 2, &quot;borderStyle&quot;: { &quot;type&quot;: &quot;STROKE&quot;, &quot;cornerRadius&quot;: 4.0 }, &quot;items&quot;: [ &quot;image&quot;: { &quot;imageUri&quot;: &quot;https://www.example.com/image.png&quot;, &quot;cropStyle&quot;: { &quot;type&quot;: &quot;SQUARE&quot; }, &quot;borderStyle&quot;: { &quot;type&quot;: &quot;STROKE&quot; } }, &quot;title&quot;: &quot;An item&quot;, &quot;textAlignment&quot;: &quot;CENTER&quot; ], &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;:&quot;https://www.example.com&quot; } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. For example, the following JSON creates a 2 column grid with a single item: ``` &quot;grid&quot;: { &quot;title&quot;: &quot;A fine collection of items&quot;, &quot;numColumns&quot;: 2, &quot;borderStyle&quot;: { &quot;type&quot;: &quot;STROKE&quot;, &quot;cornerRadius&quot;: 4.0 }, &quot;items&quot;: [ &quot;image&quot;: { &quot;imageUri&quot;: &quot;https://www.example.com/image.png&quot;, &quot;cropStyle&quot;: { &quot;type&quot;: &quot;SQUARE&quot; }, &quot;borderStyle&quot;: { &quot;type&quot;: &quot;STROKE&quot; } }, &quot;title&quot;: &quot;An item&quot;, &quot;textAlignment&quot;: &quot;CENTER&quot; ], &quot;onClick&quot;: { &quot;openLink&quot;: { &quot;url&quot;:&quot;https://www.example.com&quot; } } } ```
                  &quot;borderStyle&quot;: { # Represents the complete border style applied to items in a widget. # The border style to apply to each grid item.
                    &quot;cornerRadius&quot;: 42, # The corner radius for the border.
                    &quot;strokeColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The colors to use when the type is `BORDER_TYPE_STROKE`.
                      &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                      &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                      &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                      &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                    },
                    &quot;type&quot;: &quot;A String&quot;, # The border type.
                  },
                  &quot;columnCount&quot;: 42, # The number of columns to display in the grid. A default value is used if this field isn&#x27;t specified, and that default value is different depending on where the grid is shown (dialog versus companion).
                  &quot;items&quot;: [ # The items to display in the grid.
                    { # Represents a single item in the grid layout.
                      &quot;id&quot;: &quot;A String&quot;, # A user-specified identifier for this grid item. This identifier is returned in the parent Grid&#x27;s onClick callback parameters.
                      &quot;image&quot;: { # Represents an image. # The image that displays in the grid item.
                        &quot;altText&quot;: &quot;A String&quot;, # The accessibility label for the image.
                        &quot;borderStyle&quot;: { # Represents the complete border style applied to items in a widget. # The border style to apply to the image.
                          &quot;cornerRadius&quot;: 42, # The corner radius for the border.
                          &quot;strokeColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # The colors to use when the type is `BORDER_TYPE_STROKE`.
                            &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
                            &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
                            &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
                            &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
                          },
                          &quot;type&quot;: &quot;A String&quot;, # The border type.
                        },
                        &quot;cropStyle&quot;: { # Represents the crop style applied to an image. For example, here&#x27;s how to apply a 16 by 9 aspect ratio: ``` cropStyle { &quot;type&quot;: &quot;RECTANGLE_CUSTOM&quot;, &quot;aspectRatio&quot;: 16/9 } ``` # The crop style to apply to the image.
                          &quot;aspectRatio&quot;: 3.14, # The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. For example, here&#x27;s how to apply a 16 by 9 aspect ratio: ``` cropStyle { &quot;type&quot;: &quot;RECTANGLE_CUSTOM&quot;, &quot;aspectRatio&quot;: 16/9 } ```
                          &quot;type&quot;: &quot;A String&quot;, # The crop type.
                        },
                        &quot;imageUri&quot;: &quot;A String&quot;, # The image URL.
                      },
                      &quot;layout&quot;: &quot;A String&quot;, # The layout to use for the grid item.
                      &quot;subtitle&quot;: &quot;A String&quot;, # The grid item&#x27;s subtitle.
                      &quot;title&quot;: &quot;A String&quot;, # The grid item&#x27;s title.
                    },
                  ],
                  &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # This callback is reused by each individual grid item, but with the item&#x27;s identifier and index in the items list added to the callback&#x27;s parameters.
                    &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                    &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                      &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                      &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                      &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                    },
                  },
                  &quot;title&quot;: &quot;A String&quot;, # The text that displays in the grid header.
                },
                &quot;image&quot;: { # An image that is specified by a URL and can have an `onClick` action. # Displays an image. For example, the following JSON creates an image with alternative text: ``` &quot;image&quot;: { &quot;imageUrl&quot;: &quot;https://developers.google.com/chat/images/quickstart-app-avatar.png&quot; &quot;altText&quot;: &quot;Chat app avatar&quot; } ```
                  &quot;altText&quot;: &quot;A String&quot;, # The alternative text of this image, used for accessibility.
                  &quot;imageUrl&quot;: &quot;A String&quot;, # The `https` URL that hosts the image. For example: ``` https://developers.google.com/chat/images/quickstart-app-avatar.png ```
                  &quot;onClick&quot;: { # Represents how to respond when users click an interactive element on a card, such as a button. # When a user clicks on the image, the click triggers this action.
                    &quot;action&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, an action is triggered by this `onClick`.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;card&quot;: # Object with schema name: GoogleAppsCardV1Card # A new card is pushed to the card stack after clicking if specified. Supported by Google Workspace Add-ons, but not Chat apps.
                    &quot;openDynamicLinkAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.
                      &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                      &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                      &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                      &quot;parameters&quot;: [ # List of action parameters.
                        { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                          &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                          &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                        },
                      ],
                      &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                    },
                    &quot;openLink&quot;: { # Represents an `onClick` event that opens a hyperlink. # If specified, this `onClick` triggers an open link action.
                      &quot;onClose&quot;: &quot;A String&quot;, # Whether the client forgets about a link after opening it, or observes it until the window closes. Not supported by Chat apps.
                      &quot;openAs&quot;: &quot;A String&quot;, # How to open a link. Not supported by Chat apps.
                      &quot;url&quot;: &quot;A String&quot;, # The URL to open.
                    },
                  },
                },
                &quot;selectionInput&quot;: { # A widget that creates a UI item with options for users to select. For example, a dropdown menu or check list. Chat apps receive and can process the value of entered text during form input events. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs). When you need to collect data from users that matches options you set, use a selection input. To collect abstract data from users, use the text input widget instead. Only supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) coming soon. # Displays a selection control that lets users select items. Selection controls can be check boxes, radio buttons, switches, or dropdown menus. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` &quot;selectionInput&quot;: { &quot;name&quot;: &quot;size&quot;, &quot;label&quot;: &quot;Size&quot; &quot;type&quot;: &quot;SelectionType.DROPDOWN&quot;, &quot;items&quot;: [ { &quot;text&quot;: &quot;S&quot;, &quot;value&quot;: &quot;small&quot;, &quot;selected&quot;: false }, { &quot;text&quot;: &quot;M&quot;, &quot;value&quot;: &quot;medium&quot;, &quot;selected&quot;: true }, { &quot;text&quot;: &quot;L&quot;, &quot;value&quot;: &quot;large&quot;, &quot;selected&quot;: false }, { &quot;text&quot;: &quot;XL&quot;, &quot;value&quot;: &quot;extra_large&quot;, &quot;selected&quot;: false } ] } ```
                  &quot;items&quot;: [ # An array of the selected items. For example, all the selected check boxes.
                    { # A selectable item in a selection input, such as a check box or a switch.
                      &quot;selected&quot;: True or False, # When `true`, more than one item is selected. If more than one item is selected for radio buttons and dropdown menus, the first selected item is received and the ones after are ignored.
                      &quot;text&quot;: &quot;A String&quot;, # The text displayed to users.
                      &quot;value&quot;: &quot;A String&quot;, # The value associated with this item. The client should use this as a form input value. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                    },
                  ],
                  &quot;label&quot;: &quot;A String&quot;, # The text that appears above the selection input field in the user interface. Specify text that helps the user enter the information your app needs. For example, if users are selecting the urgency of a work ticket from a drop-down menu, the label might be &quot;Urgency&quot; or &quot;Select urgency&quot;.
                  &quot;name&quot;: &quot;A String&quot;, # The name by which the selection input is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                  &quot;onChangeAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # If specified, the form is submitted when the selection changes. If not specified, you must specify a separate button that submits the form. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                    &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                    &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                    &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                    &quot;parameters&quot;: [ # List of action parameters.
                      { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                        &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                        &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                      },
                    ],
                    &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                  },
                  &quot;type&quot;: &quot;A String&quot;, # The way that an option appears to users. Different options support different types of interactions. For example, users can enable multiple check boxes, but can only select one value from a dropdown menu. Each selection input supports one type of selection. Mixing check boxes and switches, for example, is not supported.
                },
                &quot;textInput&quot;: { # A field in which users can enter text. Supports suggestions and on-change actions. Chat apps receive and can process the value of entered text during form input events. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs). When you need to collect abstract data from users, use a text input. To collect defined data from users, use the selection input widget instead. Only supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) coming soon. # Displays a text box that users can type into. Currently supported in [dialogs](https://developers.google.com/chat/how-tos/dialogs). Support for [card messages](https://developers.google.com/chat/api/guides/message-formats/cards) is coming soon. For example, the following JSON creates a text input for an email address: ``` &quot;textInput&quot;: { &quot;name&quot;: &quot;mailing_address&quot;, &quot;label&quot;: &quot;Mailing Address&quot; } ``` As another example, the following JSON creates a text input for a programming language with static suggestions: ``` &quot;textInput&quot;: { &quot;name&quot;: &quot;preferred_programing_language&quot;, &quot;label&quot;: &quot;Preferred Language&quot;, &quot;initialSuggestions&quot;: { &quot;items&quot;: [ { &quot;text&quot;: &quot;C++&quot; }, { &quot;text&quot;: &quot;Java&quot; }, { &quot;text&quot;: &quot;JavaScript&quot; }, { &quot;text&quot;: &quot;Python&quot; } ] } } ```
                  &quot;autoCompleteAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # Optional. Specify what action to take when the text input field provides suggestions to users who interact with it. If unspecified, the suggestions are set by `initialSuggestions` and are processed by the client. If specified, the app takes the action specified here, such as running a custom function. Supported by Google Workspace Add-ons, but not Chat apps. Support by Chat apps coming soon.
                    &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                    &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                    &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                    &quot;parameters&quot;: [ # List of action parameters.
                      { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                        &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                        &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                      },
                    ],
                    &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                  },
                  &quot;hintText&quot;: &quot;A String&quot;, # Text that appears inside the text input field meant to assist users by prompting them to enter a certain value. This text is not visible after users begin typing. Required if `label` is unspecified. Otherwise, optional.
                  &quot;initialSuggestions&quot;: { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing &quot;Jav&quot;, the list of suggestions filters to show just Java and JavaScript. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter &quot;javascript&quot; and others &quot;java script&quot;. Suggesting &quot;JavaScript&quot; can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it is set to `MULTIPLE_LINE`. # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing &quot;Jav&quot;, the list of suggestions filters to show just Java and JavaScript. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter &quot;javascript&quot; and others &quot;java script&quot;. Suggesting &quot;JavaScript&quot; can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it is set to `MULTIPLE_LINE`.
                    &quot;items&quot;: [ # A list of suggestions used for autocomplete recommendations in text input fields.
                      { # One suggested value that users can enter in a text input field.
                        &quot;text&quot;: &quot;A String&quot;, # The value of a suggested input to a text input field. This is equivalent to what users would enter themselves.
                      },
                    ],
                  },
                  &quot;label&quot;: &quot;A String&quot;, # The text that appears above the text input field in the user interface. Specify text that helps the user enter the information your app needs. For example, if you are asking someone&#x27;s name, but specifically need their surname, write &quot;surname&quot; instead of &quot;name&quot;. Required if `hintText` is unspecified. Otherwise, optional.
                  &quot;name&quot;: &quot;A String&quot;, # The name by which the text input is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                  &quot;onChangeAction&quot;: { # An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # What to do when a change occurs in the text input field. Examples of changes include a user adding to the field, or deleting text. Examples of actions to take include running a custom function or opening a [dialog](https://developers.google.com/chat/how-tos/dialogs) in Google Chat.
                    &quot;function&quot;: &quot;A String&quot;, # A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Create interactive cards](https://developers.google.com/chat/how-tos/cards-onclick).
                    &quot;interaction&quot;: &quot;A String&quot;, # Optional. Required when opening a [dialog](https://developers.google.com/chat/how-tos/dialogs). What to do in response to an interaction with a user, such as a user clicking button on a card message. If unspecified, the app responds by executing an `action` - like opening a link or running a function - as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When specified, a loading indicator is not shown. Supported by Chat apps, but not Google Workspace Add-ons. If specified for an add-on, the entire card is stripped and nothing is shown in the client.
                    &quot;loadIndicator&quot;: &quot;A String&quot;, # Specifies the loading indicator that the action displays while making the call to the action.
                    &quot;parameters&quot;: [ # List of action parameters.
                      { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. To learn more, see [CommonEventObject](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
                        &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
                        &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
                      },
                    ],
                    &quot;persistValues&quot;: True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. When using [LoadIndicator.NONE](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for actions, `persist_values` = `true`is recommended, as it ensures that any changes made by the user after form or on change actions are sent to the server are not overwritten by the response. If `false`, the form values are cleared when the action is triggered. When `persist_values` is set to `false`, it is strongly recommended that the card use [LoadIndicator.SPINNER](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) for all actions, as this locks the UI to ensure no changes are made by the user while the action is being processed. Not supported by Chat apps.
                  },
                  &quot;type&quot;: &quot;A String&quot;, # How a text input field appears in the user interface. For example, whether the field is single or multi-line.
                  &quot;value&quot;: &quot;A String&quot;, # The value entered by a user, returned as part of a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
                },
                &quot;textParagraph&quot;: { # A paragraph of text that supports formatting. See [Text formatting](https://developers.google.com/workspace/add-ons/concepts/widgets#text_formatting) for details. # Displays a text paragraph. Supports [simple HTML formatted text](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). For example, the following JSON creates a bolded text: ``` &quot;textParagraph&quot;: { &quot;text&quot;: &quot; *bold text*&quot; } ```
                  &quot;text&quot;: &quot;A String&quot;, # The text that&#x27;s shown in the widget.
                },
              },
            ],
          },
        ],
      },
      &quot;cardId&quot;: &quot;A String&quot;, # Required for `cardsV2` messages. Chat app-specified identifier for this widget. Scoped within a message.
    },
  ],
  &quot;clientAssignedMessageId&quot;: &quot;A String&quot;, # A custom name for a Chat message assigned at creation. Must start with `client-` and contain only lowercase letters, numbers, and hyphens up to 63 characters in length. Specify this field to get, update, or delete the message with the specified value. For example usage, see [Name a created message](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message).
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the message was created in Google Chat server.
  &quot;fallbackText&quot;: &quot;A String&quot;, # A plain-text description of the message&#x27;s cards, used when the actual cards cannot be displayed (e.g. mobile notifications).
  &quot;lastUpdateTime&quot;: &quot;A String&quot;, # Output only. The time at which the message was last edited by a user. If the message has never been edited, this field is empty.
  &quot;matchedUrl&quot;: { # A matched url in a Chat message. Chat apps can preview matched URLs. For more information, refer to [Preview links](https://developers.google.com/chat/how-tos/preview-links). # Output only. A URL in `spaces.messages.text` that matches a link preview pattern. For more information, refer to [Preview links](https://developers.google.com/chat/how-tos/preview-links).
    &quot;url&quot;: &quot;A String&quot;, # Output only. The url that was matched.
  },
  &quot;name&quot;: &quot;A String&quot;, # Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`
  &quot;sender&quot;: { # A user in Google Chat. # Output only. The user who created the message.
    &quot;displayName&quot;: &quot;A String&quot;, # Output only. The user&#x27;s display name.
    &quot;domainId&quot;: &quot;A String&quot;, # Unique identifier of the user&#x27;s Google Workspace domain.
    &quot;isAnonymous&quot;: True or False, # Output only. When `true`, the user is deleted or their profile is not visible.
    &quot;name&quot;: &quot;A String&quot;, # Resource name for a Google Chat user. For human users, represents a person in the People API or a user in the Admin SDK Directory API. Format: `users/{user}`
    &quot;type&quot;: &quot;A String&quot;, # User type.
  },
  &quot;slashCommand&quot;: { # A [slash command](https://developers.google.com/chat/how-tos/slash-commands) in Google Chat. # Output only. Slash command information, if applicable.
    &quot;commandId&quot;: &quot;A String&quot;, # The id of the slash command invoked.
  },
  &quot;space&quot;: { # A space in Google Chat. Spaces are conversations between two or more users or 1:1 messages between a user and a Chat app. # The space the message belongs to. When accessed with [user authentication](https://developers.google.com/chat/api/guides/auth/users), only the name of the Space is populated.
    &quot;displayName&quot;: &quot;A String&quot;, # The space&#x27;s display name. For direct messages between humans, this field might be empty.
    &quot;name&quot;: &quot;A String&quot;, # Resource name of the space. Format: spaces/{space}
    &quot;singleUserBotDm&quot;: True or False, # Optional. Whether the space is a DM between a Chat app and a single human.
    &quot;spaceDetails&quot;: { # Details about the space including description and rules. # Details about the space including description and rules.
      &quot;description&quot;: &quot;A String&quot;, # Optional. A description of the space. It could describe the space&#x27;s discussion topic, functional purpose, or participants.
      &quot;guidelines&quot;: &quot;A String&quot;, # Optional. The space&#x27;s rules, expectations, and etiquette.
    },
    &quot;spaceThreadingState&quot;: &quot;A String&quot;, # Output only. The threading state in the Chat space.
    &quot;threaded&quot;: True or False, # Output only. Deprecated: Use `spaceThreadingState` instead. Whether messages are threaded in this space.
    &quot;type&quot;: &quot;A String&quot;, # Output only. Deprecated: Use `singleUserBotDm` or `spaceType` (developer preview) instead. The type of a space.
  },
  &quot;text&quot;: &quot;A String&quot;, # Plain-text body of the message. The first link to an image, video, web page, or other preview-able item generates a preview chip.
  &quot;thread&quot;: { # A thread in Google Chat. # The thread the message belongs to. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).
    &quot;name&quot;: &quot;A String&quot;, # Resource name of the thread. Example: spaces/{space}/threads/{thread}
    &quot;threadKey&quot;: &quot;A String&quot;, # Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). For other requests, this is an output only field.
  },
  &quot;threadReply&quot;: True or False, # Output only. When `true`, the message is a response in a reply thread. When `false`, the message is visible in the space&#x27;s top-level conversation as either the first message of a thread or a message with no threaded replies. If the space doesn&#x27;t support reply in threads, this field is always `false`.
}</pre>
</div>

</body></html>